ok/jj
1
0
Fork 0
forked from mirrors/jj

git: don't update public heads for now

This commit is contained in:
Martin von Zweigbergk 2021-10-20 14:21:01 -07:00
parent 579bd4b3bf
commit 2e4dc019d9
2 changed files with 2 additions and 6 deletions

View file

@ -75,11 +75,8 @@ pub fn import_refs(
let id = CommitId(git_commit.id().as_bytes().to_vec());
let commit = store.get_commit(&id).unwrap();
mut_repo.add_head(&commit);
// For now, we consider all remotes "publishing".
// TODO: Make it configurable which remotes are publishing.
if git_ref.is_remote() {
mut_repo.add_public_head(&commit);
}
// TODO: Make it configurable which remotes are publishing and update public
// heads here.
let full_name = git_ref.name().unwrap().to_string();
mut_repo.set_git_ref(full_name.clone(), RefTarget::Normal(id.clone()));
let old_target = existing_git_refs.remove(&full_name);

View file

@ -80,7 +80,6 @@ fn test_import_refs() {
commit_id(&commit5)
};
assert_eq!(*view.heads(), expected_heads);
assert_eq!(*view.public_heads(), hashset!(commit_id(&commit1)));
let expected_main_branch = BranchTarget {
local_target: Some(RefTarget::Normal(commit_id(&commit2))),