From fb9031c9566308794f888695cafd108f19d835be Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 20 Jul 2018 00:48:22 -0700 Subject: [PATCH] RepoCommand: record remote branch, group, shallow bit by default Propagating more information from the manifest to the superproject tends to work out well. These particular settings mean: Recording the remote branch in .gitmodules allows - "git submodule update --remote" to fetch the right branch - Gerrit's submodule subscription feature to subscribe from the right branch, if requested Recording groups in .gitattributes allows commands like "git clone --recurse-submodules=:(attr:platform-linux) $superproject" to clone the correct set of projects. Recording the shallow bit in .gitmodules means that "git clone --recurse-submodules" will use shallow clone in submodules where that was requested in the manifest. Gerrit's supermanifest plugin records the remote branch and shallow bit by default already, and most users of that plugin configure it to record groups in .gitattributes as well, so for most users this will be a no-op. Change-Id: Id2ed47cbca5ce822bde517494673c86ab8c58da9 Signed-off-by: Jonathan Nieder --- .../src/org/eclipse/jgit/gitrepo/RepoCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java index 80fd3cf1a..b3eee07fb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java @@ -115,9 +115,9 @@ public class RepoCommand extends GitCommand { private String groupsParam; private String branch; private String targetBranch = Constants.HEAD; - private boolean recordRemoteBranch = false; - private boolean recordSubmoduleLabels = false; - private boolean recordShallowSubmodules = false; + private boolean recordRemoteBranch = true; + private boolean recordSubmoduleLabels = true; + private boolean recordShallowSubmodules = true; private PersonIdent author; private RemoteReader callback; private InputStream inputStream;