Re: git pull and merging.

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

 



On Wednesday 06 December 2006 11:05, Aneesh Kumar wrote:
> [branch "devel"]
>         remote = origin
>         merge = devel
> 
> [....]
> Now i thought merge should be local reference. So i changed it to
> merge = remotes/origin/devel.
> 
> That also didn't work.
> 
> Then i tried the name of the branch should be indicated as
> "refs/heads/devel" . That also didn't work.
> 
> So i guess i am missing something.

See man page of git-repo-config:

 branch.<name>.merge
  When in branch <name>, it tells git fetch the default
  remote branch to be merged.

I assume that the "devel" branch on the remote repo you cloned from
is also "devel", more exactly "refs/heads/devel".

Now, instead of "git pull", git should default to

	git pull origin refs/heads/devel:refs/remotes/origin/devel

ie. it should update the local tracking branch "refs/remotes/origin/devel"
with the remote branch "refs/heads/devel".
The tracking branch "refs/remotes/origin/devel" will be merged with current
branch afterwards.

Now looking at the documentation for branch.<name>.merge, it talks
about the remote branch, which is "refs/heads/devel" in your case, ie.
the first part of the refspec of the full "git pull" command above.

So, as you already posted (without explanation, therefore this mail),
the config should be

 [branch "devel"]
         remote = origin
         merge = refs/heads/devel

However, "devel" alone should work here, as it can be matched with remote
"refs/heads/devel". Seems to be a bug, as branch.<name>.merge seems to only
being compared with the full canonical name in the implementation.

Josef

-
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]