Re: [PATCH v3 6/7] git-submodule.sh: improve variables readability

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

 



Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> writes:

>>  		--reference=*)
>> -			reference_path="${1#--reference=}"
>> +			reference="$1"
>
> --reference takes a path to some repository,
> (see also git-clone --reference),
> thus it can have any characters, including but not limit to whitespace.
> I think we need to discard this hunk!

I didn't double check the code that uses the variable, but as long
as the code that uses $reference writs it correctly, e.g.

    git subcmd ${reference:+"$reference"} ...

it should correctly pass what it received in the above assignment
from the user in $1 just fine, even if its value can contain any
arbitrary byte, I would think.






[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