Re: [PATCHv2 10/19] git-submodule.sh: convert test -a/-o to && and ||

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

 



Am 5/22/2014 10:38, schrieb Elia Pinto:
> 2014-05-22 8:49 GMT+02:00 Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx>:
>> Elia Pinto <gitter.spiros@xxxxxxxxx> writes:
>>> @@ -1059,13 +1059,17 @@ cmd_summary() {
>>>               while read mod_src mod_dst sha1_src sha1_dst status sm_path
>>>               do
>>>                       # Always show modules deleted or type-changed (blob<->module)
>>> -                     test $status = D -o $status = T && echo "$sm_path" && continue
>>> +                     case "$status" in
>>> +                     [DT])
>>> +                             printf '%s\n' "$sm_path" &&
>>> +                             continue
>>> +                     esac
>>
>> turning a echo into a printf is good, but would be better done
>> separately.
> 
> I had thought, but the change was in the fix of Johannes, and it did
> not think was right to change this, especially that it was right
> anyway. But I understand very well the observation.

My intent was to show the final state of this piece of code. I do agree
with Matthieu that the change from 'echo' to 'printf' is a different topic
(in particular, since this is not the only point in the script that would
need that change). Sorry for having sent you in circles.

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