Re: [PATCH] t1503: test rev-parse --verify --quiet with deleted reflogs

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

 



David Aguilar <davvid@xxxxxxxxx> writes:

>> > +test_expect_success 'fails silently when using -q with deleted reflogs' '
>> > +	ref=$(git rev-parse HEAD) &&
>> > +	: >.git/logs/refs/test &&
>> > +	git update-ref -m test refs/test "$ref" &&
>> 
>> I'm just curious, why not simply
>> 
>>    git branch test
>> ?
>
> Maybe it's a bad reason, but I wanted to replicate the behavior
> that git stash expects -- it writes to a ref outside of
> refs/heads/.  I thought it'd be good to exercise that same
> machinery since it will involve different code paths.

I think that is a very sensible thing to do.  Another reason to
avoid using "branch" when you care about what "update-ref" does is
that "branch" does more than what "update-ref" does.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]