git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-submodule: fix expansion of depth for cmd_update

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 22, 2019, 20:31 UTC
Message-ID
<20190822203114.18805-1-jacob.e.keller@intel.com>
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
Next: Junio C Hamano
Message 1 of 3 in “git-submodule: fix expansion of depth for cmd_update”
  1. git-submodule: fix expansion of depth for cmd_updateJacob Keller, Aug 22, 2019
  2. Junio C HamanoAug 22, 2019
  3. Keller, Jacob EAug 22, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.