Thread (24 messages) flat view 24 messages, 4 authors, 2021-11-10

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

From: Anders Kaseorg <hidden>
Date: 2021-11-09 22:53:21

Possibly related (same subject, not in this thread)

On 11/9/21 08:09, Johannes Schindelin wrote:
quoted
+		    (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.
quoted
+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.
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help