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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jacob Keller <jacob.keller@xxxxxxxxx>

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@xxxxxxxxx>
---

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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux