From 37e7e022f6c008882d44c16353958bad768230ff Mon Sep 17 00:00:00 2001 From: iczero Date: Thu, 6 Nov 2025 17:05:28 -0800 Subject: [PATCH] move worktree_branches call out of loop --- gix/src/remote/connection/fetch/update_refs/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gix/src/remote/connection/fetch/update_refs/mod.rs b/gix/src/remote/connection/fetch/update_refs/mod.rs index e33cfe2151a..64200f98805 100644 --- a/gix/src/remote/connection/fetch/update_refs/mod.rs +++ b/gix/src/remote/connection/fetch/update_refs/mod.rs @@ -76,6 +76,7 @@ pub(crate) fn update( let mut updates = Vec::new(); let mut edit_indices_to_validate = Vec::new(); + let mut checked_out_branches = worktree_branches(repo)?; let implicit_tag_refspec = fetch_tags .to_refspec() .filter(|_| matches!(fetch_tags, crate::remote::fetch::Tags::Included)); @@ -110,7 +111,6 @@ pub(crate) fn update( continue; } } - let mut checked_out_branches = worktree_branches(repo)?; let (mode, edit_index, type_change) = match local { Some(name) => { let (mode, reflog_message, name, previous_value) = match repo.try_find_reference(name)? {