clone: pass --single-branch during --recurse-submodules
Previously, performing "git clone --recurse-submodules --single-branch" resulted in submodules cloning all branches even though the superproject cloned only one branch. Pipe --single-branch through the submodule helper framework to make it to 'clone' later on. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
47319576f1
commit
132f600b06
@ -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 ()
|
||||
{
|
||||
@ -526,6 +527,12 @@ cmd_update()
|
||||
--jobs=*)
|
||||
jobs=$1
|
||||
;;
|
||||
--single-branch)
|
||||
single_branch="--single-branch"
|
||||
;;
|
||||
--no-single-branch)
|
||||
single_branch="--no-single-branch"
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@ -555,6 +562,7 @@ cmd_update()
|
||||
${dissociate:+"--dissociate"} \
|
||||
${depth:+--depth "$depth"} \
|
||||
${require_init:+--require-init} \
|
||||
$single_branch \
|
||||
$recommend_shallow \
|
||||
$jobs \
|
||||
-- \
|
||||
|
||||
Reference in New Issue
Block a user