git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: git@vger.kernel.org
Cc: Jacob Keller <jacob.keller@gmail.com>
Subject: [PATCH] git-submodule: fix expansion of depth for cmd_update
Date: Thu, 22 Aug 2019 13:31:14 -0700	[thread overview]
Message-ID: <20190822203114.18805-1-jacob.e.keller@intel.com> (raw)

From: Jacob Keller <jacob.keller@gmail.com>

The depth variable already contains "--depth=", so expanding it with an
additional --depth when invoking the update-clone git submodule--helper
is incorrect.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
---

I'm *reasonably* sure this is correct, but I am not sure how to test it.
It's possible that it expands to "--depth --depth=N" and somehow this gets
handled properly?

 git-submodule.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index c7f58c5756f7..4e7fc8bf3652 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -547,7 +547,7 @@ cmd_update()
 		${update:+--update "$update"} \
 		${reference:+"$reference"} \
 		${dissociate:+"--dissociate"} \
-		${depth:+--depth "$depth"} \
+		${depth:+"$depth"} \
 		$recommend_shallow \
 		$jobs \
 		-- \
-- 
2.23.0.245.gf157bbb9169d


             reply	other threads:[~2019-08-22 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 20:31 Jacob Keller [this message]
2019-08-22 21:01 ` [PATCH] git-submodule: fix expansion of depth for cmd_update Junio C Hamano
2019-08-22 22:38   ` Keller, Jacob E

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20190822203114.18805-1-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).