diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-05 10:43:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-05 10:43:03 -0800 |
commit | b22db265d6bde72391c8d47700dc781a3ea2ae41 (patch) | |
tree | e7cd2c479dac47579b08096130d1a8c63e04e19b /git-submodule.sh | |
parent | e8e71848ea866d7dc34eacffc20b9c3826ae29a1 (diff) | |
parent | 132f600b060c2db7fd3d450dfadb6779a61c648a (diff) | |
download | git-b22db265d6bde72391c8d47700dc781a3ea2ae41.tar.gz |
Merge branch 'es/recursive-single-branch-clone'
"git clone --recurse-submodules --single-branch" now uses the same
single-branch option when cloning the submodules.
* es/recursive-single-branch-clone:
clone: pass --single-branch during --recurse-submodules
submodule--helper: use C99 named initializer
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index afcb4c0948..89f915cae9 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -10,7 +10,7 @@ USAGE="[--quiet] [--cached] or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...] or: $dashless [--quiet] init [--] [<path>...] or: $dashless [--quiet] deinit [-f|--force] (--all| [--] <path>...) - or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...] + or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] [--] [<path>...] or: $dashless [--quiet] set-branch (--default|--branch <branch>) [--] <path> or: $dashless [--quiet] set-url [--] <path> <newurl> or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...] @@ -47,6 +47,7 @@ custom_name= depth= progress= dissociate= +single_branch= die_if_unmatched () { @@ -528,6 +529,12 @@ cmd_update() --jobs=*) jobs=$1 ;; + --single-branch) + single_branch="--single-branch" + ;; + --no-single-branch) + single_branch="--no-single-branch" + ;; --) shift break @@ -557,6 +564,7 @@ cmd_update() ${dissociate:+"--dissociate"} \ ${depth:+--depth "$depth"} \ ${require_init:+--require-init} \ + $single_branch \ $recommend_shallow \ $jobs \ -- \ |