All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Fitzpatrick <kcghost@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Stefan Beller <sbeller@google.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH 1/3] submodule: clean up subsititions in script
Date: Thu, 3 May 2018 06:46:39 -0400	[thread overview]
Message-ID: <CAEp-SHXPKJNuc+dhkZu=Vr=ju8AMHq6Rd851vNOV3WUvOQnrLg@mail.gmail.com> (raw)
In-Reply-To: <xmqqy3h2vbqj.fsf@gitster-ct.c.googlers.com>

Thanks I will amend and re-submit (this time with  -v$N, I apologize
for creating a confusing mess in everyone's email clients :))

On Wed, May 2, 2018 at 1:59 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Casey Fitzpatrick <kcghost@gmail.com> writes:
>
>> 'recommend_shallow' and 'jobs' variables do not need quotes (they never contain
>> spaces) and do not require any additional prefix, therefore remove the
>> unnecessary subsitition.
>
> The resulting patch is good, but "they never contain spaces" is not
> a very good rationale.  The real reason is that (1) we use them only
> to hold a single token value (or leave them empty) in the current
> code, and (2) if the feature they represent is enhanced in the
> future to make them multi-token options (e.g. we may allow $jobs to
> contain, in addition to "--jobs=2", "--jobs 2" for whatever reason
> later), it is likely that we would want these multi-tokens split at
> $IFS (e.g. "--jobs" and "2" get passed as separate option, not a
> single "--jobs 2" string).
>
>> 'progress' is a boolean value. Treat it like the other boolean values in the
>> script by using a substitution.
>
> This is OK.
>
>>       git submodule--helper update-clone ${GIT_QUIET:+--quiet} \
>> -             ${progress:+"$progress"} \
>> +             ${progress:+"--progress"} \
>>               ${wt_prefix:+--prefix "$wt_prefix"} \
>>               ${prefix:+--recursive-prefix "$prefix"} \
>>               ${update:+--update "$update"} \
>>               ${reference:+"$reference"} \
>>               ${depth:+--depth "$depth"} \
>> -             ${recommend_shallow:+"$recommend_shallow"} \
>> -             ${jobs:+$jobs} \
>> +             $recommend_shallow \
>> +             $jobs \
>

  reply	other threads:[~2018-05-03 10:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  8:29 git-submodule is missing --dissociate option Casey Fitzpatrick
2018-04-30 11:30 ` Casey Fitzpatrick
2018-04-30 13:16   ` Ævar Arnfjörð Bjarmason
2018-05-02  4:32     ` Junio C Hamano
2018-04-30 18:19 ` Stefan Beller
2018-04-30 21:39   ` Casey Fitzpatrick
2018-05-01 18:09     ` [PATCH 0/2] Add --progress and --dissociate to git submodule Casey Fitzpatrick
2018-05-01 18:09       ` [PATCH 1/2] submodule: Add --progress option to add command Casey Fitzpatrick
2018-05-01 18:41         ` Stefan Beller
2018-05-01 20:48           ` Casey Fitzpatrick
2018-05-01 18:09       ` [PATCH 2/2] submodule: Add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-01 20:23         ` Stefan Beller
2018-05-01 20:25         ` Eric Sunshine
2018-05-01 21:21           ` Casey Fitzpatrick
2018-05-01 18:20       ` [PATCH 0/2] Add --progress and --dissociate to git submodule Stefan Beller
2018-05-02  0:27     ` [PATCH 0/3] " Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 1/3] submodule: clean up subsititions in script Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 2/3] submodule: add --progress option to add command Casey Fitzpatrick
2018-05-02  0:27       ` [PATCH 3/3] submodule: add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-02  0:40         ` Casey Fitzpatrick
2018-05-02  0:55     ` [PATCH 0/3] Add --progress and --dissociate to git submodule Casey Fitzpatrick
2018-05-02  0:55       ` [PATCH 1/3] submodule: clean up subsititions in script Casey Fitzpatrick
2018-05-02  5:59         ` Junio C Hamano
2018-05-03 10:46           ` Casey Fitzpatrick [this message]
2018-05-02  0:55       ` [PATCH 2/3] submodule: add --progress option to add command Casey Fitzpatrick
2018-05-02  0:55       ` [PATCH 3/3] submodule: add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-02  4:37       ` [PATCH 0/3] Add --progress and --dissociate to git submodule Junio C Hamano
2018-05-02  8:54         ` Casey Fitzpatrick
2018-05-02  4:34   ` git-submodule is missing --dissociate option Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEp-SHXPKJNuc+dhkZu=Vr=ju8AMHq6Rd851vNOV3WUvOQnrLg@mail.gmail.com' \
    --to=kcghost@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@google.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.