Git context menu (#24844)

Adds the non-entry specific right click menu to the panel, and the
features contained therin:

* Stage all
* Discard Tracked Changes
* Trash Untracked Files

Also changes the naming from "Changes"/"New" to better match Git's
terminology (though not convinced on this, it was awkward to describe
"Discard Changes" without a way to distinguish between the changes and
the files containing them).

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-02-14 14:04:32 -07:00 committed by GitHub
parent bd105a5fc7
commit be83074243
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 488 additions and 82 deletions

View file

@ -320,7 +320,8 @@ message Envelope {
GitReset git_reset = 301;
GitCommitDetails git_commit_details = 302;
SetIndexText set_index_text = 299; // current max
SetIndexText set_index_text = 299;
GitCheckoutFiles git_checkout_files = 303; // current max
}
reserved 87 to 88;
@ -2688,6 +2689,14 @@ message GitReset {
}
}
message GitCheckoutFiles {
uint64 project_id = 1;
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
string commit = 4;
repeated string paths = 5;
}
message GetPanicFilesResponse {
repeated string file_contents = 2;
}

View file

@ -441,6 +441,7 @@ messages!(
(InstallExtension, Background),
(RegisterBufferWithLanguageServers, Background),
(GitReset, Background),
(GitCheckoutFiles, Background),
(GitShow, Background),
(GitCommitDetails, Background),
(SetIndexText, Background),
@ -579,6 +580,7 @@ request_messages!(
(RegisterBufferWithLanguageServers, Ack),
(GitShow, GitCommitDetails),
(GitReset, Ack),
(GitCheckoutFiles, Ack),
(SetIndexText, Ack),
);
@ -674,6 +676,7 @@ entity_messages!(
RegisterBufferWithLanguageServers,
GitShow,
GitReset,
GitCheckoutFiles,
SetIndexText,
);