From: Johan Herland <johan@herland.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, Matt Graham <mdg149@gmail.com>,
Junio C Hamano <gitster@pobox.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 11:18:49 +0200 [thread overview]
Message-ID: <200804191118.50105.johan@herland.net> (raw)
In-Reply-To: <200804182358.31041.jnareb@gmail.com>
On Friday 18 April 2008, Jakub Narebski wrote:
> On Wed, 16 April 2008, Johan Herland wrote:
> > So far, the best proposal I've seen, is Hommey's suggestion of storing
> > the description after the sha1 in the ref file itself.
> > Of course, git would have to be taught (a) to handle ref files with
> > descriptions, and (b) to propagate descriptions along with refs.
>
> (c) find a place for branch descriptions in packed refs.
This shouldn't be too hard. Today, we already have one kind of "special"
lines in the packed-refs format: "peeled", which uses lines starting with
"^". I think we could add another special kind of line called "description"
which uses lines starting with "#". Multiline descriptions (if we want to
support such) would just have "#" prepended to each line, and the parser
would associate all "#"-lines with the most recently parsed ref (like it
does for the "^"-line today).
> Let me sum up here proposals where to put branch description:
> 1. Put them in branch.<name>.description in repository config. Not easily
> (automatically) propagated for dumb transports.
> 2. Put them in-tree, which is a bad idea because branches are
> un-versioned (or versioned separately), so branches description
> should also be un-versioned.
> 3. Put them in GIT_DIR/info/refs_description, in some format. It makes
> it very easy to add support for propagation for dumb transports.
> Native transport probably would need some extension. Should not
> interfere with the rest of git code.
> 4. Store description after sha1 in the ref file itself. Automatic
> propagation for dumb transport (whether we want it or not). Native
> transport as above. Very high probabily of interfering with the rest
> of code, especially shell part of Git. Need to find a place for
> descriptions in pack-refs.
> 5. Store them as value of 'refs/heads/<branch>' file in a tree for
> a commit for a special '<description>' separate special branch; at
> least if I understand this proposal correctly. Something like IIRC
> the 'notes' / 'annotations' idea was implemented (on git mailing list;
> it never got into mainline).
>
>
> I think that the best proposal is (3), not (4) as you say.
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). But as you say, (4) may have implementation
difficulties of its own. I guess the first acceptable implementation will
win.
Have fun!
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2008-04-19 9:20 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 [this message]
2008-04-19 17:43 ` Junio C Hamano
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=200804191118.50105.johan@herland.net \
--to=johan@herland.net \
--cc=benji@silverinsanity.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.