mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-02 18:01:05 +00:00
git: unify loop that consumes stale/excluded git refs
This commit is contained in:
parent
aa2359fdec
commit
5fda093481
1 changed files with 2 additions and 5 deletions
|
@ -111,11 +111,6 @@ pub fn import_some_refs(
|
|||
let store = mut_repo.store().clone();
|
||||
let mut jj_view_git_refs = mut_repo.view().git_refs().clone();
|
||||
let mut pinned_git_heads = HashMap::new();
|
||||
for (ref_name, old_target) in &jj_view_git_refs {
|
||||
if !git_ref_filter(ref_name) {
|
||||
pinned_git_heads.insert(ref_name.to_string(), old_target.adds().clone());
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Should this be a separate function? We may not always want to import
|
||||
// the Git HEAD (and add it to our set of heads).
|
||||
|
@ -183,6 +178,8 @@ pub fn import_some_refs(
|
|||
if git_ref_filter(&full_name) {
|
||||
mut_repo.remove_git_ref(&full_name);
|
||||
changed_git_refs.insert(full_name, (Some(target), None));
|
||||
} else {
|
||||
pinned_git_heads.insert(full_name, target.adds());
|
||||
}
|
||||
}
|
||||
for (full_name, (old_git_target, new_git_target)) in &changed_git_refs {
|
||||
|
|
Loading…
Reference in a new issue