{"thread":{"id":"17976","subject":"[EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does","startedAt":"2009-02-23T18:55:22Z","lastAt":"2009-02-23T19:51:28Z","messageCount":3,"participants":["Ferry Huberts","Robin Rosenberg"],"isPatch":true,"patchVersion":3,"patchTotal":1},"messages":[{"id":"105930","messageId":"cover.1235415204.git.ferry.huberts@pelagic.nl","threadId":"17976","inReplyTo":null,"subject":"[EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does","fromName":"Ferry Huberts","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-02-23T18:55:22Z","receivedAt":"2009-02-23T18:55:22Z","isPatch":true,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"Currently the plugin does not setup the default remote branch, something that\ngit-clone does do.\n\nThis patch fixes the issue and makes the plugin setup a cloned repository\nexactly the same as git-clone.\n\nFerry Huberts (1):\n  Make sure to set up the default remote branch correctly\n\n .../org/spearce/egit/core/op/CloneOperation.java   |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n"},{"id":"105931","messageId":"0c1bcfebbad98e6e6f3432d03550f7710186d231.1235415204.git.ferry.huberts@pelagic.nl","threadId":"17976","inReplyTo":"cover.1235415204.git.ferry.huberts@pelagic.nl","subject":"[EGIT] [PATCH v3 1/1] Make sure to set up the default remote branch correctly","fromName":"Ferry Huberts","fromEmail":"ferry.huberts@pelagic.nl","sentAt":"2009-02-23T18:55:23Z","receivedAt":"2009-02-23T18:55:23Z","isPatch":true,"sender":{"key":"ferry.huberts@pelagic.nl","avatar":"https://gravatar.com/avatar/9f63c0289ad23cbdef0f7609a0af85ff0f4b3babfd066de9ff58f62d48cfd6f2?d=mp&s=160"},"body":"This is to make sure that the plugin sets up a clone\nin the same fashion as git-clone.\n\nSigned-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>\n---\n .../org/spearce/egit/core/op/CloneOperation.java   |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --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\nindex 777894c..a5b4e50 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java\n@@ -32,6 +32,7 @@\n import org.spearce.jgit.lib.Ref;\n import org.spearce.jgit.lib.RefUpdate;\n import org.spearce.jgit.lib.Repository;\n+import org.spearce.jgit.lib.RepositoryConfig;\n import org.spearce.jgit.lib.Tree;\n import org.spearce.jgit.lib.WorkDirCheckout;\n import org.spearce.jgit.transport.FetchResult;\n@@ -158,6 +159,17 @@ private void doInit(final IProgressMonitor monitor)\n \t\tlocal.getConfig().setBoolean(\"core\", null, \"bare\", false);\n \n \t\tremoteConfig.update(local.getConfig());\n+\n+\t\t// branch is like 'Constants.R_HEADS + branchName', we need only \n+\t\t// the 'branchName' part\n+\t\tString branchName = branch.substring(Constants.R_HEADS.length());\n+\n+\t\t// setup the default remote branch for branchName\n+\t\tlocal.getConfig().setString(RepositoryConfig.BRANCH_SECTION,\n+\t\t\t\tbranchName, \"remote\", remoteName);\n+\t\tlocal.getConfig().setString(RepositoryConfig.BRANCH_SECTION,\n+\t\t\t\tbranchName, \"merge\", branch);\n+\n \t\tlocal.getConfig().save();\n \t}\n \n-- \n1.6.0.6\n"},{"id":"105935","messageId":"200902232051.28459.robin.rosenberg.lists@dewire.com","threadId":"17976","inReplyTo":"cover.1235415204.git.ferry.huberts@pelagic.nl","subject":"Re: [EGIT] [PATCH v3 0/1] Make sure to setup a clone the same as git-clone does","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-02-23T19:51:28Z","receivedAt":"2009-02-23T19:51:28Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"måndag 23 februari 2009 19:55:22 skrev Ferry Huberts <ferry.huberts@pelagic.nl>:\n> Currently the plugin does not setup the default remote branch, something that\n> git-clone does do.\n\nIf you have only one patch in a series, please send only one email. For \"extra\" comment\nthat you don't want to go in to the commit message add them after the \"---\" that follows\nthe commit message.\n\n-- robin\n"}]}