git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [EGIT] [PATCH 2/2] Make sure to set up the default (pull) remote branch for master

From
Ferry Huberts (Pelagic) <ferry.huberts@pelagic.nl>
Date
Feb 23, 2009, 16:13 UTC
Message-ID
<49A2CB47.6050303@pelagic.nl>
In-Reply-To
<20090223160957.GK22848@spearce.org>
Shawn O. Pearce wrote:
Show 21 quoted lines
> ferry.huberts@pelagic.nl wrote:
>> This is to make sure that the git plugin sets up a clone
>> in the same fashion as the CLI git clone command.
> ...
>> @@ -158,6 +159,11 @@ private void doInit(final IProgressMonitor monitor)
>>  		local.getConfig().setBoolean("core", null, "bare", false);
>>  		
>>  		remoteConfig.update(local.getConfig());
>> +
>> +		/* setup the default (pull) remote branch for master */
>> +		local.getConfig().setString(RepositoryConfig.BRANCH_SECTION, Constants.MASTER, "remote", remoteName);
>> +		local.getConfig().setString(RepositoryConfig.BRANCH_SECTION, Constants.MASTER, "merge", Constants.R_HEADS + Constants.MASTER);
> 
> Shouldn't this be "branch" and not "Constants.MASTER" ?
> 
> IIRC the dialog lets you start off a branch that isn't "master",
> especially if the remote repository has no branch named "master"
> but has something else that HEAD points at.  "git clone" would
> setup this branch.${branch}.merge to point at what the upstream
> branch calls itself.
> 
yep. missed that. want a new patch? afaic you can patch that up yourself :-)
Ferry
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 5 of 7 in “Make sure to setup a clone the same as git-clone does”
  1. ferry.huberts@pelagic.nlFeb 21, 2009
  2. [EGIT] [PATCH 1/2] Make sure to set core.bare to false when cloningferry.huberts@pelagic.nl, Feb 21, 2009
  3. [EGIT] [PATCH 2/2] Make sure to set up the default (pull) remote branch for masterferry.huberts@pelagic.nl, Feb 21, 2009
  4. Shawn O. PearceFeb 23, 2009
  5. Ferry Huberts (Pelagic)Feb 23, 2009
  6. Shawn O. PearceFeb 23, 2009
  7. Shawn O. PearceFeb 23, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.