Re: [PATCH] git-submodule.sh: avoid "test <cond> -a/-o <cond>"

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

 



Am 6/10/2014 16:55, schrieb Junio C Hamano:
> Elia Pinto <gitter.spiros@xxxxxxxxx> writes:
> 
>> @@ -832,7 +832,7 @@ Maybe you want to use 'update --init'?")"
>>  			continue
>>  		fi
>>  
>> -		if ! test -d "$sm_path"/.git -o -f "$sm_path"/.git
>> +		if ! test -d "$sm_path"/.git || test -f "$sm_path"/.git
> 
> Which part of test conditions does that "!" apply in the original,
> and in the updated? 
> 
> I think the new test after || also needs negation, no?

Not just that; the || must be turned into && as well.

I noticed a similar construct later in the patch in a review of an earlier
iteration, but missed this one.

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