On Mon, Jul 13, 2015 at 09:35:40AM -0700, Junio C Hamano wrote:
> What is interesting is to think what should happen when amlog@{1}
> is given. The version with your patch gives the same output as we
> saw earlier, because amlog@{1} tree exists, but does not know about
> your patch (yet), so does not add "Notes" section, which makes sense
> by itself.
>
> But we cannot tell if amlog@{1} was somehow malformed or it was OK
> and there was no notes on the commit.
>
> We probably should do a few more things:
>
> - Make sure that we show "there is no such tree-ish, no way to look
> up any note to any commit from there" and "I understood the tree
> you gave me, but there is no note for that commit" differently.
After refreshing the patch against current "next", it appears that
there is such a distinction:
$ ./git-log --notes=fdsfgsfdg HEAD^! --pretty=short
warning: notes ref refs/notes/fdsfgsfdg is invalid
commit e5b68b2e879608d881c2e3600ce84962fcdefc88
Author: Mike Hommey <[email protected]>
notes: allow treeish expressions as notes ref
$ ./git-log --notes=foo HEAD^! --pretty=short
commit e5b68b2e879608d881c2e3600ce84962fcdefc88
Author: Mike Hommey <[email protected]>
notes: allow treeish expressions as notes ref
(I do have a refs/notes/foo ref)
> - Decide if we want to "fail" the operation when the notes tree
> given by the user is not even a tree-ish or just "warn" and keep
> going. And do so consistently.
Currently, it warns and doesn't fail.
Cheers,
Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html