Re: [PATCH 2/3] log: add default decoration filter

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

 



On 7/26/2022 10:39 AM, Ævar Arnfjörð Bjarmason wrote:
> 
> On Tue, Jul 26 2022, Derrick Stolee via GitGitGadget wrote:
> 
>> From: Derrick Stolee <derrickstolee@xxxxxxxxxx>
>> [...]
>>  test_expect_success 'log.decorate config parsing' '
>>  	git log --oneline --decorate=full >expect.full &&
>>  	git log --oneline --decorate=short >expect.short &&
>> @@ -2198,6 +2204,23 @@ test_expect_success 'log --decorate includes all levels of tag annotated tags' '
>>  	test_cmp expect actual
>>  '
>>  
>> +test_expect_success 'log --decorate does not include things outside filter' '
>> +	reflist="refs/prefetch/ refs/rebase-merge/ refs/bundle/" &&
>> +
>> +	for ref in $reflist
>> +	do
>> +		mkdir -p .git/$ref &&
> 
> Let's not use -p, and fail if .git doesn't exist?

The reflist contains multi-leveled refs. However, they don't go more than
one level beyond .git/refs/, so -p shouldn't be necessary since .git/refs/
should exist.
 
>> +		echo $(git rev-parse HEAD) >.git/$ref/fake || return 1
> 
> Hiding the exit code of the "git rev-parse here, but aside fram that why
> is the echo needed at all, can't we just:
> 
> 	git rev-parse HEAD >.git/ref/fake
> 
> But even more generally can't we:
> 
> 	git update-ref $ref/fake HEAD
> 
> ?

This was just a brain fart on my part.

> If we need to manually munge the ref store let's add REFFILES prereq.

We don't. Thanks.

-Stolee



[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