Subject: Re: [PATCH v2] Introduce %<branch> as shortcut to the tracked branch

From: Michael J Gruber <[email-masked]>
Date: Thu, 19 Mar 2009 16:17:52 +0100

Michael J Gruber venit, vidit, dixit 19.03.2009 15:52:
> Johannes Schindelin venit, vidit, dixit 18.03.2009 23:46:
>> Hi,
>>
>> On Wed, 18 Mar 2009, Junio C Hamano wrote:
>>
>>> Johannes Schindelin <[email-masked]> writes:
>>>
>>>> Suggested by Pasky.
>>>>
>>>> Signed-off-by: Johannes Schindelin <[email-masked]>
>>>
>>> In the longer term who suggested matters much less than why such a 
>>> feature is desirable, how it is used, and without it what is impossible 
>>> and/or cumbersome.  What's the motivation behind this?
>>>
>>> You do not have to explain it to me, but you should explain it to the 
>>> history that records this commit, and to the users who read doccos.
>>
>> And that's not all... Documentation updates and tests for % and %<branch> 
>> are missing, too.
>>
>> My main motivation to make this patch was to see how fast I could come up 
>> with something working that does not hurt my eyes.
>>
>> But I do not have time to do more today: My main project as well as Git 
>> got accepted into the Google Summer of Code program, so I am even more 
>> swamped than usually.
>>
>> So... if anybody feels like it, I would be very thankful for a proper 
>> commit message, documentation and tests...
> 
> Just a quick note that I'm feeling like it... Though it seems this does
> not quite work with local branches, i.e. a branch created with
> 
> git checkout --track -b tracking tracked
> 
> with "tracked" being a local branch. I don't see why on first inspection
> of the code (branch.tracking.merge = refs/heads/tracked, so what), but
> maybe you will...

So, for a local branch, branch_get() returns a branch without merge info
even though it's in the config (the remote is "." here). "git branch
--track" is specifically meant for (branching off a ) local branch,
because it's the default for remote branches anyway. Right? Does not
look right.

Michael