diff options
author | Stefan Beller <sbeller@google.com> | 2016-08-11 16:14:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-12 15:00:17 -0700 |
commit | 5f50f33e875cc877747a40a80e8ead73db0ec8c1 (patch) | |
tree | a3e7f3a837174a34e26a2b8253bff7840cb89e4f /git-submodule.sh | |
parent | 965dbea09a5a71e78f72f11fd792646a4ce2a17a (diff) | |
download | git-5f50f33e875cc877747a40a80e8ead73db0ec8c1.tar.gz |
submodule--helper update-clone: allow multiple references
Allow the user to pass in multiple references to update_clone.
Currently this is only internal API, but once the shell script is
replaced by a C version, this is needed.
This fixes an API bug between the shell script and the helper.
Currently the helper accepts "--reference" "--reference=foo"
as a OPT_STRING whose value happens to be "--reference=foo", and
then uses
if (suc->reference)
argv_array_push(&child->args, suc->reference)
where suc->reference _is_ "--reference=foo" when invoking the
underlying "git clone", it cancels out.
With this change we omit one of the "--reference" arguments when
passing references from the shell script to the helper.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index c90dc335d1..3b412f554b 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -575,7 +575,7 @@ cmd_update() ${wt_prefix:+--prefix "$wt_prefix"} \ ${prefix:+--recursive-prefix "$prefix"} \ ${update:+--update "$update"} \ - ${reference:+--reference "$reference"} \ + ${reference:+"$reference"} \ ${depth:+--depth "$depth"} \ ${recommend_shallow:+"$recommend_shallow"} \ ${jobs:+$jobs} \ |