Subject: Re: [PATCH] notes: Use get_sha1_committish instead of read_ref in init_notes()

From: Jeff King <[email-masked]>
Date: Wed, 17 Jun 2015 12:35:36 -0400

On Wed, Jun 17, 2015 at 06:02:46PM +0900, Mike Hommey wrote:

> > In a sense that is weirdly broken already:
> > 
> >   $ git log --notes=:/foo >/dev/null
> >   warning: notes ref refs/notes/:/foo is invalid
> > 
> > but I wonder if we should be making expand_notes_ref a little more
> > careful as part of the same topic.
> 
> Interestingly, now that I look, there's also this:
> https://github.com/git/git/blob/master/notes-cache.c#L40
> 
> that doesn't use expand_notes_ref, but it's apparently only used in
> userdiff_get_textconv, and I'm not sure why.

notes-cache.c predates expand_notes_ref. I don't think it's a big deal.
The implementation of notes-cache is an internal detail (the user
interacts with it by setting diff.*.cacheTextConv, and then git handles
the cache).

-Peff