Re: [PATCH v2 0/7] t5520: tests for --[no-]autostash option
- From
Mehul Jain <mehul.jain2029@gmail.com>
- Date
- Apr 4, 2016, 16:58 UTC
- Message-ID
- <CA+DCAeQaS0P=Rntv5xY97MQ-j_1ji6O+MgvmcnjVmxC3KsNfRw@mail.gmail.com>
- In-Reply-To
- <vpqshz125jr.fsf@anie.imag.fr>
On Mon, Apr 4, 2016 at 1:01 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 18 quoted lines
> Mehul Jain <mehul.jain2029@gmail.com> writes:
>
>> -test_rebase_autostash () {
>> +test_pull_autostash () {
>> git reset --hard before-rebase &&
>> echo dirty >new_file &&
>> git add new_file &&
>> - git pull --rebase --autostash . copy &&
>> + git pull $@ . copy &&
>
> Not strictly needed here, but I'd write "$@" (with the double-quotes)
> which is the robust way to say "transmit all my arguments without
> whitespace interpretation".
>
> I don't mind for this patch since there's no whitespace to interpret,
> but some people (sysadmins ;-) ) have the bad habit of writting $@, $*
> or "$*" in wrapper scripts and it breaks when you call them with spaces
> so it's better to take good habits IHMO.Thanks for the suggestion, I will remember it. I'm relatively new to shell and therefore didn't know much about the difference between "$@" and $@, $*, "$*".
Now that I have read[1][2] about it, it won't be repeated.
[1]: http://unix.stackexchange.com/questions/41571/what-is-the-difference-between-and/94200#94200 [2]: http://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke-on-whitespace-or-other-special-characters
Thanks, Mehul