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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ferry.huberts@xxxxxxxxxx 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.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux