Merge branch 'os/fetch-check-not-current-branch'
The way "git fetch" without "--update-head-ok" ensures that HEAD in no worktree points at any ref being updated was too wasteful, which has been optimized a bit. * os/fetch-check-not-current-branch: fetch: limit shared symref check only for local branches
This commit is contained in:
commit
5ed49a75f3
@ -1440,6 +1440,7 @@ static void check_not_current_branch(struct ref *ref_map,
|
||||
const struct worktree *wt;
|
||||
for (; ref_map; ref_map = ref_map->next)
|
||||
if (ref_map->peer_ref &&
|
||||
starts_with(ref_map->peer_ref->name, "refs/heads/") &&
|
||||
(wt = find_shared_symref(worktrees, "HEAD",
|
||||
ref_map->peer_ref->name)) &&
|
||||
!wt->is_bare)
|
||||
|
Loading…
Reference in New Issue
Block a user