Re: [PATCH v4 1/4] fetch: Protect branches checked out in all worktrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux