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

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

 



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.

+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



[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