From: Junio C Hamano Date: Wed, 11 Dec 2024 06:09:02 GMT Subject: Re: [PATCH v3 6/7] git-submodule.sh: improve variables readability Message-ID: In-Reply-To: Đoàn Trần Công Danh 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.