On 11/9/21 08:09, Johannes Schindelin wrote:
+ (wt = find_shared_symref("HEAD", ref_map->peer_ref->name)))
Do we need `&& !wt->is_bare` here, too?
Sure (in the “future-proofing” sense), will add.
+test_expect_success 'refuse fetch to current branch of worktree' '
+ test_when_finished "git worktree remove --force wt" &&
Do we also need `&& git branch -D wt` here?
Will add.
+ git fetch -u . HEAD:wt
Maybe even `test_path_exists wt/apple.t`, to verify that the worktree has
been updated?
Not here; git fetch -u never updates working trees, not even the main
working tree. Is that a bug? I don’t know, but if it is, it’s
certainly a separate one.
Anders