Re: [PATCH v2 2/3] clone: propagate empty remote HEAD even with other branches

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

 



On Fri, Jul 08, 2022 at 08:41:47AM -0700, Junio C Hamano wrote:

> > +	grep "refs/heads/mydefaultbranch" file_unborn_child/.git/HEAD &&
> 
> We know they do not have mydefaultbranch2 branch, so this grep may
> be sufficient, but peeking into the implementation detail of HEAD is
> not necessary.  The kosher way is way more verbose and awkward,
> though:
> 
> 	git -C file_unborn_child symbolic-ref HEAD >actual &&
> 	echo refs/heads/mydefaultbranch >expect &&
> 	test_cmp actual expect &&
> 
> I dunno.

Yeah, that occurred to me, too. I _think_ it's fine for now, even in a
reftable world, because HEAD there is always still a file.

At any rate, this was following the lead of the other tests in the file,
so my thought was to do that for now, and if we care we can convert them
all on top (maybe even with a helper).

-Peff



[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