git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] notes: accept any ref for merge

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 19, 2014, 17:29 UTC
Message-ID
<xmqq4mw3o6xj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140919093910.GA15891@peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
> I think this change affects not just "git notes merge", but all of the
> notes lookups (including just "git notes show"). However, I'd argue
> that's a good thing, as it allows more flexibility in note storage. The
> downside is that if you have a notes ref like
> "refs/notes/refs/heads/master", you can no longer refer to it as
> "refs/heads/master" (you have to use the fully qualified name to get the
> note). But:
>
>   1. This makes the notes resolution a lot more like regular ref
>      resolution (i.e., we now allow fully qualified refs, and you can
>      store remote notes outside of refs/notes if you want to).
>
>   2. There are already a bunch of names that have the same problem. You
>      cannot refer to "refs/notes/notes/foo" as "notes/foo", nor
>      "refs/notes/refs/notes/foo" as "refs/notes/foo". Yes, these are
>      silly names, so is the example above.
>
> So it's backwards incompatible with the current behavior, but I think in
> a good way.
Yup, I agree with the analysis.
Show 9 quoted lines
>> ---
>>  notes.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I think you need to adjust t3308 (and you should probably add a new test
> exercising your case; this is exactly the sort of thing that it's easy
> to accidentally regress later).
>
> -Peff
Previous: Jeff King
Message 9 of 9 in “notes: accept any ref for merge”
  1. notes: accept any ref for mergeScott Chacon, Sep 19, 2014
  2. Jeff KingSep 19, 2014
  3. Johan HerlandSep 19, 2014
  4. Junio C HamanoSep 19, 2014
  5. Johan HerlandSep 20, 2014
  6. Junio C HamanoSep 22, 2014
  7. Kyle J. McKayNov 22, 2014
  8. Jeff KingDec 4, 2014
  9. Junio C HamanoSep 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.