From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Daniel Barkalow <barkalow@iabervon.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 2/2] Make local branches behave like remote branches when --tracked
Date: Fri, 27 Mar 2009 17:52:16 +0100 [thread overview]
Message-ID: <49CD0440.6010304@drmicha.warpmail.net> (raw)
In-Reply-To: <7v1vsjey3s.fsf@gitster.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 27.03.2009 17:20:
> Michael J Gruber <git@drmicha.warpmail.net> writes:
>
>> Junio C Hamano venit, vidit, dixit 27.03.2009 09:08:
>> ...
>>> After calling r-f-t, because this new code assumes that for the "." remote
>>> (aka "local repository"), r-f-t lies and does not give back what it
>>> expects, fixes what it got back from r-f-t. Shouldn't we be fixing this
>>> inside r-f-t?
>>
>> The technical reason is that there is no local remote, i.e. no remote
>> struct for '.', and I don't think we want it, because it would show up
>> in all places where the list of remotes is searched/displayed/...
>>
>> With ret being the branch we talk about, r-f-t is passed ret->remote and
>> ret->merge[i] only. In the local case, r-f-t cannot use the remote
>> struct for '.' (there is none) to find what it needs, and it has no easy
>> access to ret->merge_names[i] which is that info.
>>
>> branch_get(), on the other hand, has all needed info in place.
>
> Thanks for a detailed explanation. Would it deserve to be in the commit
> log justification in a summarized form?
You tell me :)
I'm still unsure at times how detailed commit messages should be, but I
take it I should put a shortened version of the above in there.
>
>> ..., even worse: if foo is
>> ambiguous because refs/heads/foo and refs/remotes/foo exist then
>> refs/heads/foo would win, i.e. we used to output the *wrong* ref. The
>> above disambiguates. But I'll see if I can simplify the output based on
>> the necessity of disambiguation.
>
> Thanks.
I thought about doing the following:
- remove occurences of refs/remotes (like before the patch) and of
refs/heads. That way the output format stays the same, the amiguity
problem is not worsened
- think later/harder about doing this more cleverly. I guess I need to
check the output of dwim_ref, but have to figure out all the input
parameters first...
Michael
next prev parent reply other threads:[~2009-03-27 16:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 14:22 Tracking of local branches Michael J Gruber
2009-03-20 16:13 ` Michael J Gruber
2009-03-20 16:46 ` Junio C Hamano
2009-03-20 18:10 ` Daniel Barkalow
2009-03-26 20:53 ` [PATCH 0/2] Make local branches behave like remote branches when --tracked Michael J Gruber
2009-03-26 20:53 ` [PATCH 1/2] Test for local branches being followed with --track Michael J Gruber
2009-03-26 20:53 ` [PATCH 2/2] Make local branches behave like remote branches when --tracked Michael J Gruber
2009-03-27 8:08 ` Junio C Hamano
2009-03-27 8:47 ` Michael J Gruber
2009-03-27 16:20 ` Junio C Hamano
2009-03-27 16:52 ` Michael J Gruber [this message]
2009-04-01 21:42 ` [PATCHv2 0/2] " Michael J Gruber
2009-04-01 21:42 ` [PATCHv2 1/2] Test for local branches being followed with --track Michael J Gruber
2009-04-01 21:42 ` [PATCHv2 2/2] Make local branches behave like remote branches when --tracked Michael J Gruber
2009-03-26 20:57 ` [PATCH 0/2] " Michael J Gruber
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=49CD0440.6010304@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).