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

From: Junio C Hamano <[email-masked]>
Date: Wed, 11 Dec 2024 15:09:02 +0900

Đoàn Trần Công Danh <[email-masked]> 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.