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

Re: [PATCH v4 3/4] receive-pack: Protect current branch for bare repository worktree

From: Anders Kaseorg <hidden>
Date: 2021-11-09 23:04:03

On 11/9/21 08:22, Johannes Schindelin wrote:
While `find_shared_symref()` currently won't return a `worktree` with a
non-zero `is_bare`, to future-proof the code we might want to turn the
`if (worktree)` below (8 lines outside the current diff context) into `if
(worktree && !worktree->is_bare)`.
Will do.
quoted
+test_expect_success 'denyCurrentBranch and bare repository worktrees' '
+	test_when_finished "rm -fr bare.git" &&
While `wt/` will be created inside `bare.git` and therefore be removed,
the branch `wt` won't. Maybe add `&& git branch -D wt`?
The branch ‘wt’ is inside bare.git.
I like fruit, too! Apple, banana, grape, yummy. I wonder what's next :-)
Yay!
Maybe make sure that `bare.git/wt/grape.t` exists? We do want the worktree
to be updated, after all...
Right, I’d forgotten this one.  Will do.

Thanks all for the helpful reviews!

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