git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Aaron Crane <git@aaroncrane.co.uk>,
	Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Subject: Re: git notes issues (was: cvs revision number -> git commit name?)
Date: Wed, 27 Jan 2010 12:28:50 +0100	[thread overview]
Message-ID: <201001271228.50992.johan@herland.net> (raw)
In-Reply-To: <7vpr4wq6w3.fsf@alter.siamese.dyndns.org>

On Wednesday 27 January 2010, Junio C Hamano wrote:
> Johan Herland <johan@herland.net> writes:
> > The notes feature is still very new, and there are still outstanding
> > patches to be merged, but the basics are there in v1.6.6.
> 
> By the way, we should seriously rethink how notes should propagate
>  through rebases and amends.  I've been using this in my post-applypatch
>  hook lately:
> 
> [...]
> 
> A few observations I made myself so far:
> 
>  - I used to fix minor issues (styles, decl-after-stmt, etc.) using
>    rebase-i long after running "am" in bulk, but these days I find myself
>    going back to my "inbox" and fix them in MUA; this is only because I
>    know these notes do not propagate across rebases and
>  amends---adjusting the workflow to the tool's limitation is not very
>  good.

Agreed. I simply haven't had time to look much into this yet. We should 
probably add options (both command-line options and config variables) to 
'git rebase', 'git commit --amend', 'git cherry-pick', etc. for bringing 
notes across a commit rewrite. We should probably also add "git notes 
move/copy <old_object> <new_object>" subcommands to make the same operations 
available to scripts (and users).

>  - The interface to tell tools to use which notes ref to use should be
>    able to say "these refs", not just "this ref" i.e. GIT_NOTES_REF=a:b
>    just like PATH=a:b:c...); I am fairly certain that we would want to
>    store different kind of information in separate notes trees and
>    aggregate them, as we gain experience with notes.

Agreed.

>  - There should be an interface to tell tools to use which notes refs via
>    command line options; "!alias" does not TAB-complete, and "git lgm"
>    above doesn't, either. "git log --notes=notes/amlog
>  --notes=notes/other" would probably be the way to go.

Agreed.

>  - While reviewing the "inbox", I sometimes wonder if I applied a message
>    to somewhere already, but there is no obvious way to grep in the notes
>    tree and get the object name that a note is attached to.  Of course I
>    know I can "git grep -c johan@herland.net notes/amlog" and it will
>  give me something like:
> 
>     notes/amlog:65807ee697a28cb30b8ad38ebb8b84cebd3f255d:1
>     notes/amlog:c789176020d6a008821e01af8b65f28abc138d4b:1
> 
>    but this won't scale and needs scripting to mechanize, once we start
>    rebalancing the notes tree with different fan-outs.  The end user (me
>    in this case) is interested in "set of objects that match this grep
>    criteria", not "the pathnames the notes tree's implementation happens
>    to use to store notes for them in the hierarchy".

Agreed. Should add a "git notes grep" subcommand.

I hope that once the updated notes API is in (I'll send an update to what's 
in 'pu' shortly), people will have the tools they need to start integrating 
notes with their pet Git features. As you illustrate perfectly above, there 
are many corners to be smoothed out before this is well integrated with the 
other Git tools.


Have fun! :)

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

  reply	other threads:[~2010-01-27 11:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 21:53 cvs revision number -> git commit name? Hallvard B Furuseth
2010-01-26 22:53 ` Aaron Crane
2010-01-26 23:43   ` Johan Herland
2010-01-27  8:38     ` Junio C Hamano
2010-01-27 11:28       ` Johan Herland [this message]
2010-01-27 17:47     ` Hallvard B Furuseth
2010-01-27 22:19       ` Johan Herland

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=201001271228.50992.johan@herland.net \
    --to=johan@herland.net \
    --cc=git@aaroncrane.co.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=h.b.furuseth@usit.uio.no \
    /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).