Re: [PATCH] contrib/subtree: verify HEAD is valid before adding a subtree

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

 



On Tuesday, February 11, 2025 12:28:46 AM GMT+8 Junio C Hamano wrote:
> In short, "is not" -> "may not be", perhaps?

Yes, thank you!

> And if we want to treat an unborn HEAD equivalent to an empty tree,
> then dying upon seeing "show-ref" fail would not be a good solution
> to the problem, no?  Shouldn't the updated logic to deal with an
> unborn HEAD be more like "if we see that the HEAD is unborn, then we
> are happy iff the index is empty; if HEAD already points at a
> commit, then we are happy iff the working tree has no changes
> relative to it"?

I did consider treating an unborn HEAD as a empty tree and test if index is 
empty. However I searched and failed to find out a git subcommand to do that 
test (:
Do you have any suggestions?

-- 
Bingwu Zhang
xtex @ Tue, 11 Feb 2025 01:10:17 +0000








[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