diff options
author | Anders Kaseorg <andersk@mit.edu> | 2021-12-01 14:15:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-01 22:18:25 -0800 |
commit | 8bc1f39f411e06b940230dc84da5568dfafec922 (patch) | |
tree | 667a72d0d0509b2675e0a3655b5b3da525553280 /fetch-negotiator.c | |
parent | worktree: simplify find_shared_symref() memory ownership model (diff) | |
download | tgif-8bc1f39f411e06b940230dc84da5568dfafec922.tar.xz |
fetch: protect branches checked out in all worktrees
Refuse to fetch into the currently checked out branch of any working
tree, not just the current one.
Fixes this previously reported bug:
https://lore.kernel.org/git/cb957174-5e9a-5603-ea9e-ac9b58a2eaad@mathema.de/
As a side effect of using find_shared_symref, we’ll also refuse the
fetch when we’re on a detached HEAD because we’re rebasing or bisecting
on the branch in question. This seems like a sensible change.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-negotiator.c')
0 files changed, 0 insertions, 0 deletions