aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorStefan Lay <stefan.lay@sap.com>2012-02-23 09:32:02 -0800
committerKevin Sawicki <kevin@github.com>2012-02-23 09:32:02 -0800
commit54f23873d60f3b7f70427f5db9ff2a93229a193e (patch)
tree5166714316c36471cb422ac576356b059acbf8cd /org.eclipse.jgit
parent0211d910017d1ba083b8c102a7a902ed103fe4f5 (diff)
downloadjgit-54f23873d60f3b7f70427f5db9ff2a93229a193e.tar.gz
jgit-54f23873d60f3b7f70427f5db9ff2a93229a193e.zip
Add support for autosetuprebase to the CloneCommand
Bug: 345536 Change-Id: I93c609235dec4e5e3a2ddc275c28b202bf868d40 Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Kevin Sawicki <kevin@github.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
index ae72b770fe..3a0d8f55ec 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -270,6 +270,14 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
branchName, ConfigConstants.CONFIG_KEY_REMOTE, remote);
clonedRepo.getConfig().setString(ConfigConstants.CONFIG_BRANCH_SECTION,
branchName, ConfigConstants.CONFIG_KEY_MERGE, head.getName());
+ String autosetupRebase = clonedRepo.getConfig().getString(
+ ConfigConstants.CONFIG_BRANCH_SECTION, null,
+ ConfigConstants.CONFIG_KEY_AUTOSETUPREBASE);
+ if (ConfigConstants.CONFIG_KEY_ALWAYS.equals(autosetupRebase)
+ || ConfigConstants.CONFIG_KEY_REMOTE.equals(autosetupRebase))
+ clonedRepo.getConfig().setBoolean(
+ ConfigConstants.CONFIG_BRANCH_SECTION, branchName,
+ ConfigConstants.CONFIG_KEY_REBASE, true);
clonedRepo.getConfig().save();
}