git: Add option to branch from default branch in branch picker (#34663)
Closes #33700 The option shows up as an icon that appears on entries that would create a new branch. You can also branch from the default by secondary confirming, which the icon has a tooltip for as well. We based the default branch on the results from this command: `git symbolic-ref refs/remotes/upstream/HEAD` and fallback to `git symbolic-ref refs/remotes/origin/HEAD` Release Notes: - Add option to create a branch from a default branch in git branch picker --------- Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
parent
fa8dd1c547
commit
9fa634f02f
7 changed files with 133 additions and 9 deletions
|
@ -422,3 +422,12 @@ message BlameBufferResponse {
|
|||
|
||||
reserved 1 to 4;
|
||||
}
|
||||
|
||||
message GetDefaultBranch {
|
||||
uint64 project_id = 1;
|
||||
uint64 repository_id = 2;
|
||||
}
|
||||
|
||||
message GetDefaultBranchResponse {
|
||||
optional string branch = 1;
|
||||
}
|
||||
|
|
|
@ -399,7 +399,10 @@ message Envelope {
|
|||
GetColorPresentationResponse get_color_presentation_response = 356;
|
||||
|
||||
Stash stash = 357;
|
||||
StashPop stash_pop = 358; // current max
|
||||
StashPop stash_pop = 358;
|
||||
|
||||
GetDefaultBranch get_default_branch = 359;
|
||||
GetDefaultBranchResponse get_default_branch_response = 360; // current max
|
||||
}
|
||||
|
||||
reserved 87 to 88;
|
||||
|
|
|
@ -315,7 +315,9 @@ messages!(
|
|||
(LogToDebugConsole, Background),
|
||||
(GetDocumentDiagnostics, Background),
|
||||
(GetDocumentDiagnosticsResponse, Background),
|
||||
(PullWorkspaceDiagnostics, Background)
|
||||
(PullWorkspaceDiagnostics, Background),
|
||||
(GetDefaultBranch, Background),
|
||||
(GetDefaultBranchResponse, Background),
|
||||
);
|
||||
|
||||
request_messages!(
|
||||
|
@ -483,7 +485,8 @@ request_messages!(
|
|||
(GetDebugAdapterBinary, DebugAdapterBinary),
|
||||
(RunDebugLocators, DebugRequest),
|
||||
(GetDocumentDiagnostics, GetDocumentDiagnosticsResponse),
|
||||
(PullWorkspaceDiagnostics, Ack)
|
||||
(PullWorkspaceDiagnostics, Ack),
|
||||
(GetDefaultBranch, GetDefaultBranchResponse),
|
||||
);
|
||||
|
||||
entity_messages!(
|
||||
|
@ -615,7 +618,8 @@ entity_messages!(
|
|||
GetDebugAdapterBinary,
|
||||
LogToDebugConsole,
|
||||
GetDocumentDiagnostics,
|
||||
PullWorkspaceDiagnostics
|
||||
PullWorkspaceDiagnostics,
|
||||
GetDefaultBranch
|
||||
);
|
||||
|
||||
entity_messages!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue