Re: [PATCH] clone: teach --single-branch and --branch during --recurse
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- Jan 8, 2020, 23:39 UTC
- Message-ID
- <20200108233905.GE181522@google.com>
- In-Reply-To
- <20200108231900.192476-1-emilyshaffer@google.com>
On Wed, Jan 08, 2020 at 03:19:00PM -0800, Emily Shaffer wrote:
Bah, in my attempt to keep the subject brief I was aiming to write "--recursive" but instead just wrote "--recurse" which is wrong. I can push another version with the fix if desired.
Show 16 quoted lines
> 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 and its friend, --branch, > through the submodule helper framework to make it to 'clone' later on. > > Signed-off-by: Emily Shaffer <emilyshaffer@google.com> > --- > Note that 'branch' was already in use in git-submodules.sh, so > "submodule branch" aka 'sm_branch' was used to disambiguate the two. > > Documentation/git-submodule.txt | 6 +++++- > builtin/clone.c | 6 ++++++ > builtin/submodule--helper.c | 28 +++++++++++++++++++++++++--- > git-submodule.sh | 17 ++++++++++++++++- > t/t5617-clone-submodules-remote.sh | 26 ++++++++++++++++++++++++-- > 5 files changed, 76 insertions(+), 7 deletions(-)