Skip to content

Commit c3beb20

Browse files
authored
Merge pull request #2249 from iczero/fetch-performance-fix
Move worktree_branches call out of loop in ref update
2 parents 0ac3080 + 37e7e02 commit c3beb20

File tree

1 file changed

+1
-1
lines changed
  • gix/src/remote/connection/fetch/update_refs

1 file changed

+1
-1
lines changed

gix/src/remote/connection/fetch/update_refs/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub(crate) fn update(
7676
let mut updates = Vec::new();
7777
let mut edit_indices_to_validate = Vec::new();
7878

79+
let mut checked_out_branches = worktree_branches(repo)?;
7980
let implicit_tag_refspec = fetch_tags
8081
.to_refspec()
8182
.filter(|_| matches!(fetch_tags, crate::remote::fetch::Tags::Included));
@@ -110,7 +111,6 @@ pub(crate) fn update(
110111
continue;
111112
}
112113
}
113-
let mut checked_out_branches = worktree_branches(repo)?;
114114
let (mode, edit_index, type_change) = match local {
115115
Some(name) => {
116116
let (mode, reflog_message, name, previous_value) = match repo.try_find_reference(name)? {

0 commit comments

Comments
 (0)