From: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>
To: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Junio C Hamano <junkio@cox.net>,
git@vger.kernel.org
Subject: Re: git pull and merging.
Date: Thu, 07 Dec 2006 12:16:24 +0530 [thread overview]
Message-ID: <4577B8C0.3060200@gmail.com> (raw)
In-Reply-To: <200612061744.31213.Josef.Weidendorfer@gmx.de>
Josef Weidendorfer wrote:
> 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
this means the remote reference is refs/heads/devel and local tracking branch for that is 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.
>
That will be merged is the tricky part.
> 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.
>
This is most confusing part. What merge indicate is not about refs/heads/devel
should track refs/remotes/origin/devel. That is specfied in the remote config option.
What merge indicate is that when in a local branch ( not the tracking one under remotes/origin)
which branch from remote need to be used to merge to the local branch.
> 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.
I guess we need to have a standard way of saying the branches.
May be we want to document it in repo-config.
local branch on which changes can be made <branch-name>
local tracking branch refs/remotes/<remote-name>/<branch-name>
remote branch refs/heads/<branch-name>
next prev parent reply other threads:[~2006-12-07 6:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 4:51 git pull and merging Aneesh Kumar
2006-12-06 5:02 ` Junio C Hamano
2006-12-06 5:21 ` Aneesh Kumar
2006-12-06 9:26 ` Johannes Schindelin
2006-12-06 10:00 ` Peter Baumann
2006-12-06 10:14 ` Johannes Schindelin
2006-12-06 10:23 ` Peter Baumann
2006-12-06 10:05 ` Aneesh Kumar
2006-12-06 10:28 ` Jakub Narebski
[not found] ` <cc723f590612060236k7839942el8d048eedfdee3682@mail.gmail.com>
[not found] ` <cc723f590612060248y6f730a54l3a2aadfa6500d36d@mail.gmail.com>
2006-12-06 10:48 ` Fwd: " Aneesh Kumar
2006-12-06 16:44 ` Josef Weidendorfer
2006-12-07 6:46 ` Aneesh Kumar K.V [this message]
2006-12-07 11:27 ` Josef Weidendorfer
2006-12-07 19:06 ` Junio C Hamano
2006-12-07 22:54 ` Josef Weidendorfer
2006-12-08 1:56 ` Santi Béjar
2006-12-08 17:23 ` Josef Weidendorfer
2006-12-08 19:12 ` [PATCH] Add branch.*.localmerge and documentation update Josef Weidendorfer
2006-12-08 20:52 ` Santi Béjar
2006-12-08 21:38 ` Junio C Hamano
2006-12-08 21:48 ` Jakub Narebski
2006-12-08 22:01 ` Josef Weidendorfer
2006-12-08 22:34 ` Junio C Hamano
2006-12-08 23:17 ` Josef Weidendorfer
2006-12-08 23:41 ` Junio C Hamano
2006-12-09 1:28 ` [PATCH] Add branch.*.merge warning " Josef Weidendorfer
2006-12-09 16:14 ` Santi Béjar
2006-12-08 21:39 ` [PATCH] Add branch.*.localmerge " Josef Weidendorfer
2006-12-08 22:15 ` Santi Béjar
2006-12-08 20:09 ` git pull and merging Santi Béjar
2006-12-08 7:07 ` Junio C Hamano
2006-12-07 23:06 ` Junio C Hamano
2006-12-08 2:04 ` Santi Béjar
2006-12-08 11:48 ` Jakub Narebski
2006-12-06 9:31 ` Jakub Narebski
2006-12-06 9:58 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4577B8C0.3060200@gmail.com \
--to=aneesh.kumar@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=Josef.Weidendorfer@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).