Improve handling of remote-tracking branches in the picker (#29744)

Release Notes:

- Changed the git branch picker to make remote-tracking branches less
prominent

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Cole Miller
2025-05-01 21:24:26 -04:00
committed by GitHub
co-authored by Anthony Eid
parent 92b9ecd7d2
commit e1e3f2e423
13 changed files with 150 additions and 124 deletions
+4 -4
View File
@@ -2902,7 +2902,7 @@ async fn test_git_branch_name(
.read(cx)
.branch
.as_ref()
.map(|branch| branch.name.to_string()),
.map(|branch| branch.name().to_owned()),
branch_name
)
}
@@ -6864,7 +6864,7 @@ async fn test_remote_git_branches(
let branches_b = branches_b
.into_iter()
.map(|branch| branch.name.to_string())
.map(|branch| branch.name().to_string())
.collect::<HashSet<_>>();
assert_eq!(branches_b, branches_set);
@@ -6895,7 +6895,7 @@ async fn test_remote_git_branches(
})
});
assert_eq!(host_branch.name, branches[2]);
assert_eq!(host_branch.name(), branches[2]);
// Also try creating a new branch
cx_b.update(|cx| {
@@ -6933,5 +6933,5 @@ async fn test_remote_git_branches(
})
});
assert_eq!(host_branch.name, "totally-new-branch");
assert_eq!(host_branch.name(), "totally-new-branch");
}
@@ -293,7 +293,7 @@ async fn test_ssh_collaboration_git_branches(
let branches_b = branches_b
.into_iter()
.map(|branch| branch.name.to_string())
.map(|branch| branch.name().to_string())
.collect::<HashSet<_>>();
assert_eq!(&branches_b, &branches_set);
@@ -326,7 +326,7 @@ async fn test_ssh_collaboration_git_branches(
})
});
assert_eq!(server_branch.name, branches[2]);
assert_eq!(server_branch.name(), branches[2]);
// Also try creating a new branch
cx_b.update(|cx| {
@@ -366,7 +366,7 @@ async fn test_ssh_collaboration_git_branches(
})
});
assert_eq!(server_branch.name, "totally-new-branch");
assert_eq!(server_branch.name(), "totally-new-branch");
// Remove the git repository and check that all participants get the update.
remote_fs