From: Junio C Hamano <gitster@pobox.com>
To: Johan Herland <johan@herland.net>
Cc: Jakub Narebski <jnareb@gmail.com>,
git@vger.kernel.org, Matt Graham <mdg149@gmail.com>,
Brian Gernhardt <benji@silverinsanity.com>,
Russ Dill <russ.dill@gmail.com>,
Stephen Sinclair <radarsat1@gmail.com>
Subject: Re: branch description
Date: Sat, 19 Apr 2008 10:43:14 -0700 [thread overview]
Message-ID: <7v1w51g2q5.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200804191118.50105.johan@herland.net> (Johan Herland's message of "Sat, 19 Apr 2008 11:18:49 +0200")
Johan Herland <johan@herland.net> writes:
> The problem with (3) vs. (4) is that in (3) we must make sure that whenever
> a branch is moved/renamed (e.g. "git clone", "git branch -m", probably more
> as well), the corresponding description is moved/renamed as well. This is
> elegantly solved in (4).
If your "elegently solved" is coming from an assumption that it is enough
for "git mv" (for example) to just copy whatever is in .git/refs/heads/foo
to .git/refs/heads/bar without understanding what is contained in it, that
assumption unfortunately does not hold.
You must support packed refs, so you need to teach the refs infrastructure
what per-branch attributes there are other than the commit object name it
points at anyway.
And we already do -- when you do "branch -m foo bar", corresponding config
entries are also renamed. We also move reflogs.
A possible approach that would work, which contains elements from (4), is
to change implementations of loose ref to have this extra info in loose
ref files (that is what (4) is), *and* introduce another separate
mechanism to store corresponding information for packed refs elsewhere.
Propagation needs to deal with both representations, renaming needs to
deal with both representations, looking up needs to deal with both
representations, everybody needs to deal with both representations.
If you are going to invent "another separate mechanism" to support packed
refs anyway, why not use that same mechanism to record information for
loose ones as well? That is the approach suggested by (3). In either way
we need to teach relevant parts of the code for propagation, renaming,
looking up etc about the new mechanism.
next prev parent reply other threads:[~2008-04-19 17:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 16:51 branch description Stephen Sinclair
2008-04-15 17:31 ` Russ Dill
2008-04-15 18:01 ` Brian Gernhardt
2008-04-15 19:12 ` Junio C Hamano
2008-04-15 19:19 ` Jeff King
2008-04-15 22:37 ` Jeff King
2008-04-15 22:56 ` Junio C Hamano
2008-04-15 20:53 ` Stephen Sinclair
2008-04-15 21:04 ` Brian Gernhardt
2008-04-16 1:33 ` Jakub Narebski
2008-04-16 2:55 ` Jeff King
2008-04-16 3:28 ` Stephen Sinclair
2008-04-16 5:55 ` Mike Hommey
2008-04-16 3:46 ` Matt Graham
2008-04-16 8:29 ` Johan Herland
2008-04-18 21:58 ` Jakub Narebski
2008-04-19 9:18 ` Johan Herland
2008-04-19 17:43 ` Junio C Hamano [this message]
2008-04-19 18:09 ` Johan Herland
2008-04-19 21:05 ` Jakub Narebski
2008-04-16 5:27 ` Junio C Hamano
2008-04-16 19:56 ` Jakub Narebski
2008-04-15 18:36 ` Jakub Narebski
-- strict thread matches above, loose matches on Subject: below --
2008-04-22 17:57 Michael Dressel
2008-04-22 18:46 ` Johan Herland
2008-04-22 18:59 ` Jakub Narebski
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=7v1w51g2q5.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=johan@herland.net \
--cc=mdg149@gmail.com \
--cc=radarsat1@gmail.com \
--cc=russ.dill@gmail.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).