Re: Comment on weak refs
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 10, 2007, 06:33 UTC
- Message-ID
- <Pine.LNX.4.64.0706100716480.4059@racer.site>
- In-Reply-To
- <200706100325.32846.johan@herland.net>
Hi,
On Sun, 10 Jun 2007, Johan Herland wrote:
Show 7 quoted lines
> On Sunday 10 June 2007, Junio C Hamano wrote: > > > Maybe you first think A and B are related and then later change your > > mind. Should "softref" relationships be versioned? > > Intriguing idea. Not immediately sure how we would implement it > though...
Has my lightweight annotation patch reached you?
I like my approach better than yours, because it is
1) a way, way smaller patch, and 2) it automatically includes the versionability.
After thinking about it a little more (my plane was slow, and as a result I am allowed to spend 8 more hours in Paris), I think that a small but crucial change would make this thing even more useful:
Instead of having "core.showAnnotations" be a boolean config, it might be better to have "core.annotationsRef" instead, overrideable by the environment variable GIT_ANNOTATION_REF.
With this, you can have different refs for different kinds of annotations.
For example, some people might add bugtracker comments (even comments like "this commit was bad: introduced bug #798, solved by commit 9899fdadc.."). Those comments could live in refs/annotations/bugs. To see them, just say
GIT_ANNOTATION_REF=refs/annotations/bugs gitk
Voila.
I am quite certain that treating annotations as branches, containing fan-out directories for the reverse lookup. I am even quite certain that in most cases, a working-directory-less merging is possible for such annotations.
Ciao, Dscho