git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Introduce light weight commit annotations
Date: Sun, 10 Jun 2007 19:56:32 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706101952180.4059@racer.site> (raw)
In-Reply-To: <200706101514.14954.johan@herland.net>

Hi,

On Sun, 10 Jun 2007, Johan Herland wrote:

> On Saturday 09 June 2007, Johannes Schindelin wrote:
>
> > With the provided script, edit-commit-annotations, you can add 
> > after-the-fact annotations to commits, which will be shown by the log 
> > if the config variable core.showannotations is set.
> > 
> > The annotations are tracked in a new ref, refs/annotations/commits, in 
> > the same fan-out style as .git/objects/??/*, only that they only exist 
> > in the object database now.
> 
> Very interesting. I have to say that after having played around with
> it a couple of minutes, I really like it. Needs some polishing here
> and there (i.e. cleaning up the COMMIT_ANNOTATION.NNNN* files), but
> it is a very good proof-of-concept.

Thanks. I composed it in a hurry, since I wanted it to go out before I 
took my flight home.

> > 	I have the hunch that this will be relatively fast and scalable,
> > 	since the tree objects are sorted by name (the name being the
> > 	object name of the to-be-annotated commit).
> 
> I think I agree with your hunch, although I initially thought that your
> solution was a bit heavy on the number of objects created. But, hey, git
> is _designed_ to handle massive amounts of objects. :)

Besides, these tree objects should delta really well, being almost as 
efficient as having only one tree object to begin with.

> > diff --git a/config.c b/config.c
> > index 58d3ed5..34db9b2 100644
> > --- a/config.c
> > +++ b/config.c
> > @@ -356,6 +356,11 @@ int git_default_config(const char *var, const char *value)
> >  		return 0;
> >  	}
> >  
> > +	if (!strcmp(var, "core.showannotaions")) {
> > +		show_commit_annotations = git_config_bool(var, value);
> > +		return 0;
> > +	}
> > +
> 
> Small typo here. "core.showannotaions" should be "core.showannotations",
> I guess.

Yep. I tested it with "core.shownotes", but decided before sending the 
patch that the name would be inconsistent with the rest of the code.

However, as I suggested later, I could imagine that an even better way 
could be to have "core.annotationsRef", overrideable by 
GIT_ANNOTATIONS_REF, which could possibly even be a list of refs.

BTW I am not married to calling it "annotations". If you like "notes" 
better, I'm fine with it.

Ciao,
Dscho

  reply	other threads:[~2007-06-10 18:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09 17:55 [PATCH] Introduce light weight commit annotations Johannes Schindelin
2007-06-10 13:14 ` Johan Herland
2007-06-10 18:56   ` Johannes Schindelin [this message]
2007-06-10 19:20     ` Johan Herland
2007-06-10 19:53       ` Johannes Schindelin
2007-06-10 22:11 ` Junio C Hamano
2007-06-10 23:00   ` Johannes Schindelin
2007-06-10 23:29     ` Junio C Hamano
2007-06-11 10:25       ` Johannes Schindelin
2007-06-12 17:28       ` Johannes Schindelin
2007-06-10 22:58 ` Alex Riesen
2007-06-10 23:20 ` Alex Riesen
2007-06-11  1:11   ` Junio C Hamano
2007-06-11  2:09 ` Nicolas Pitre
2007-06-11  7:24   ` Alex Riesen
2007-06-11  7:43     ` Junio C Hamano
2007-06-11  8:05       ` Alex Riesen
2007-06-11 10:22   ` Johannes Schindelin

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=Pine.LNX.4.64.0706101952180.4059@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@herland.net \
    /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).