All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Fitzpatrick <kcghost@gmail.com>
To: git@vger.kernel.org, sbeller@google.com, sunshine@sunshineco.com,
	gitster@pobox.com
Cc: Casey Fitzpatrick <kcghost@gmail.com>
Subject: [PATCH v4 1/3] submodule: clean up subsititions in script
Date: Thu,  3 May 2018 06:53:44 -0400	[thread overview]
Message-ID: <20180503105346.1758-2-kcghost@gmail.com> (raw)
In-Reply-To: <20180503105346.1758-1-kcghost@gmail.com>

'recommend_shallow' and 'jobs' variables do not need quotes. They only hold a
single token value, and even if they were multi-token it is likely we would want
them split at IFS rather than pass a single string.

'progress' is a boolean value. Treat it like the other boolean values in the
script by using a substitution.

Signed-off-by: Casey Fitzpatrick <kcghost@gmail.com>
---
 git-submodule.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 24914963c..262547968 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -465,7 +465,7 @@ cmd_update()
 			GIT_QUIET=1
 			;;
 		--progress)
-			progress="--progress"
+			progress=1
 			;;
 		-i|--init)
 			init=1
@@ -542,14 +542,14 @@ cmd_update()
 
 	{
 	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 \
 		"$@" || echo "#unmatched" $?
 	} | {
 	err=
-- 
2.17.0.1.ge0414f29c.dirty


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 10:53 [PATCH v4 0/3] Add --progress and --dissociate to git submodule Casey Fitzpatrick
2018-05-03 10:53 ` Casey Fitzpatrick [this message]
2018-05-03 10:53 ` [PATCH v4 2/3] submodule: add --progress option to add command Casey Fitzpatrick
2018-05-03 10:53 ` [PATCH v4 3/3] submodule: add --dissociate option to add/update commands Casey Fitzpatrick
2018-05-17  2:48 ` [PATCH v4 0/3] Add --progress and --dissociate to git submodule 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=20180503105346.1758-2-kcghost@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.