* [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does @ 2009-02-23 18:55 Ferry Huberts 2009-02-23 18:55 ` [EGIT] [PATCH v3 1/1] Make sure to set up the default remote branch correctly Ferry Huberts 2009-02-23 19:51 ` [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Robin Rosenberg 0 siblings, 2 replies; 3+ messages in thread From: Ferry Huberts @ 2009-02-23 18:55 UTC (permalink / raw) To: git; +Cc: Ferry Huberts Currently the plugin does not setup the default remote branch, something that git-clone does do. This patch fixes the issue and makes the plugin setup a cloned repository exactly the same as git-clone. Ferry Huberts (1): Make sure to set up the default remote branch correctly .../org/spearce/egit/core/op/CloneOperation.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) ^ permalink raw reply [flat|nested] 3+ messages in thread
* [EGIT] [PATCH v3 1/1] Make sure to set up the default remote branch correctly 2009-02-23 18:55 [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Ferry Huberts @ 2009-02-23 18:55 ` Ferry Huberts 2009-02-23 19:51 ` [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Robin Rosenberg 1 sibling, 0 replies; 3+ messages in thread From: Ferry Huberts @ 2009-02-23 18:55 UTC (permalink / raw) To: git; +Cc: Ferry Huberts This is to make sure that the plugin sets up a clone in the same fashion as git-clone. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> --- .../org/spearce/egit/core/op/CloneOperation.java | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java b/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java index 777894c..a5b4e50 100644 --- a/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java +++ b/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java @@ -32,6 +32,7 @@ import org.spearce.jgit.lib.Ref; import org.spearce.jgit.lib.RefUpdate; import org.spearce.jgit.lib.Repository; +import org.spearce.jgit.lib.RepositoryConfig; import org.spearce.jgit.lib.Tree; import org.spearce.jgit.lib.WorkDirCheckout; import org.spearce.jgit.transport.FetchResult; @@ -158,6 +159,17 @@ private void doInit(final IProgressMonitor monitor) local.getConfig().setBoolean("core", null, "bare", false); remoteConfig.update(local.getConfig()); + + // branch is like 'Constants.R_HEADS + branchName', we need only + // the 'branchName' part + String branchName = branch.substring(Constants.R_HEADS.length()); + + // setup the default remote branch for branchName + local.getConfig().setString(RepositoryConfig.BRANCH_SECTION, + branchName, "remote", remoteName); + local.getConfig().setString(RepositoryConfig.BRANCH_SECTION, + branchName, "merge", branch); + local.getConfig().save(); } -- 1.6.0.6 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does 2009-02-23 18:55 [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Ferry Huberts 2009-02-23 18:55 ` [EGIT] [PATCH v3 1/1] Make sure to set up the default remote branch correctly Ferry Huberts @ 2009-02-23 19:51 ` Robin Rosenberg 1 sibling, 0 replies; 3+ messages in thread From: Robin Rosenberg @ 2009-02-23 19:51 UTC (permalink / raw) To: Ferry Huberts; +Cc: git måndag 23 februari 2009 19:55:22 skrev Ferry Huberts <ferry.huberts@pelagic.nl>: > Currently the plugin does not setup the default remote branch, something that > git-clone does do. If you have only one patch in a series, please send only one email. For "extra" comment that you don't want to go in to the commit message add them after the "---" that follows the commit message. -- robin ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-23 19:53 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-23 18:55 [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Ferry Huberts 2009-02-23 18:55 ` [EGIT] [PATCH v3 1/1] Make sure to set up the default remote branch correctly Ferry Huberts 2009-02-23 19:51 ` [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does Robin Rosenberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).