diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-20 11:01:01 -0700 |
commit | 3807098cd6abf4b94b6e0326255e5f5f0577f975 (patch) | |
tree | 34d2bb8e5c9ae4f9409c2cfdd6206ec32a5ff5d0 /git-submodule.sh | |
parent | de76eb69d2359f4820b120e49be9a30067bb5d3b (diff) | |
parent | abed000acafd8aa86e02bcbb65fc1a8e4f06b8a0 (diff) | |
download | git-3807098cd6abf4b94b6e0326255e5f5f0577f975.tar.gz |
Merge branch 'sb/submodule-recommend-shallowness'
An upstream project can make a recommendation to shallowly clone
some submodules in the .gitmodules file it ships.
* sb/submodule-recommend-shallowness:
submodule update: learn `--[no-]recommend-shallow` option
submodule-config: keep shallow recommendation around
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 128f22ffb8..b39ac106ec 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -9,7 +9,7 @@ USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <re 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] [--reference <repository>] [--recursive] [--] [<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] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...] or: $dashless [--quiet] foreach [--recursive] <command> or: $dashless [--quiet] sync [--recursive] [--] [<path>...]" @@ -530,6 +530,12 @@ cmd_update() --checkout) update="checkout" ;; + --recommend-shallow) + recommend_shallow="--recommend-shallow" + ;; + --no-recommend-shallow) + recommend_shallow="--no-recommend-shallow" + ;; --depth) case "$2" in '') usage ;; esac depth="--depth=$2" @@ -572,6 +578,7 @@ cmd_update() ${update:+--update "$update"} \ ${reference:+--reference "$reference"} \ ${depth:+--depth "$depth"} \ + ${recommend_shallow:+"$recommend_shallow"} \ ${jobs:+$jobs} \ "$@" || echo "#unmatched" } | { |