Re: branch description
- From
Johan Herland <johan@herland.net>
- Date
- Apr 16, 2008, 08:29 UTC
- Message-ID
- <200804161029.18601.johan@herland.net>
- In-Reply-To
- <1c5969370804152046h8d67630m697ca71b523b04d9@mail.gmail.com>
On Wednesday 16 April 2008, Matt Graham wrote:
Show 11 quoted lines
> On Tue, Apr 15, 2008 at 9:33 PM, Jakub Narebski <jnareb@gmail.com> wrote: > > I think it wouldb be better to put branches descriptions somewhere > > outside object repository, be it .git/info/ref_names of .git/config. > > I agree that outside the object repository would be better. > Propogating branch descriptions doesn't seem all that useful. I > wouldn't usually expect to want a branch for the same purpose as the > upstream repository and it would seem weird to get a default > description of it coming along with the branch. Just like I give my > branches my own name, I would expect to have to give them my own > description.
On the contrary, when I clone/pull from some repo, I would very much like to have a copy of its branch description stored locally. Of course, these descriptions should be renamed along with their corresponding branch upon entering my repo. To illustrate: Suppose I clone/pull "refs/heads/foo" from a remote repo "bob". The branch will be stored as "refs/remotes/bob/foo" in my repo. Now, if "refs/heads/foo" on "bob" has a branch description, I would like to have that branch description copied into my repo, but referring to "refs/remotes/bob/foo" instead of "refs/heads/foo", of course.
Now, when it comes to my own local branches, I agree with you: If I make a new local branch "refs/heads/foo" that tracks "refs/remotes/bob/foo", I will probably not want git to copy the branch description automatically.
However, I do agree that putting branch description inside the working tree is not the right solution. 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.
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net