Git push/pull/fetch (#25445)

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
This commit is contained in:
Mikayla Maki 2025-02-24 10:29:52 -08:00 committed by GitHub
parent b1b6401ce7
commit ff6844300e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1242 additions and 180 deletions

View file

@ -321,7 +321,13 @@ message Envelope {
GitCommitDetails git_commit_details = 302;
SetIndexText set_index_text = 299;
GitCheckoutFiles git_checkout_files = 303; // current max
GitCheckoutFiles git_checkout_files = 303;
Push push = 304;
Fetch fetch = 305;
GetRemotes get_remotes = 306;
GetRemotesResponse get_remotes_response = 307;
Pull pull = 308; // current max
}
reserved 87 to 88;
@ -2772,3 +2778,46 @@ message OpenCommitMessageBuffer {
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
}
message Push {
uint64 project_id = 1;
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
string remote_name = 4;
string branch_name = 5;
optional PushOptions options = 6;
enum PushOptions {
SET_UPSTREAM = 0;
FORCE = 1;
}
}
message Fetch {
uint64 project_id = 1;
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
}
message GetRemotes {
uint64 project_id = 1;
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
optional string branch_name = 4;
}
message GetRemotesResponse {
repeated Remote remotes = 1;
message Remote {
string name = 1;
}
}
message Pull {
uint64 project_id = 1;
uint64 worktree_id = 2;
uint64 work_directory_id = 3;
string remote_name = 4;
string branch_name = 5;
}

View file

@ -445,6 +445,11 @@ messages!(
(GitShow, Background),
(GitCommitDetails, Background),
(SetIndexText, Background),
(Push, Background),
(Fetch, Background),
(GetRemotes, Background),
(GetRemotesResponse, Background),
(Pull, Background),
);
request_messages!(
@ -582,6 +587,10 @@ request_messages!(
(GitReset, Ack),
(GitCheckoutFiles, Ack),
(SetIndexText, Ack),
(Push, Ack),
(Fetch, Ack),
(GetRemotes, GetRemotesResponse),
(Pull, Ack),
);
entity_messages!(
@ -678,6 +687,10 @@ entity_messages!(
GitReset,
GitCheckoutFiles,
SetIndexText,
Push,
Fetch,
GetRemotes,
Pull,
);
entity_messages!(