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

Re: [PATCH v7 4/4] notes: teach git-notes about notes.<ref>.mergestrategy option

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2015, 17:33 UTC
Message-ID
<xmqqlhd9es5s.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CA+P7+xofitJ2tTxqtRyWitcSKt4sKZCH5tygJxXScuW8wkW=SA@mail.gmail.com>
Jacob Keller <jacob.keller@gmail.com> writes:
> How do you feel about having the duplicate check for the short_ref? We
> *already* check this inside init_notes_check() which is called right
> after this.

I thought you were trying to enforce a new rule (i.e. must be under "refs/notes/") with this, but it isn't. It is "we are going to strip the prefix known to us, just make sure the caller did not feed us something bogus" safety, and the placement of this new check in your patch (i.e. only when strategy was not given so we need to check which short-ref we are dealing with) is the best place.

Thanks.
Previous: Jacob KellerNext: Jacob Keller
Message 13 of 16 in “notes.mergestrategy option(s)”
  1. 0/4 notes.mergestrategy option(s)Jacob Keller, Aug 14, 2015
  2. 1/4 notes: document cat_sort_uniq rewriteModeJacob Keller, Aug 14, 2015
  3. Junio C HamanoAug 14, 2015
  4. Jacob KellerAug 14, 2015
  5. Johan HerlandAug 15, 2015
  6. 2/4 notes: add tests for --commit/--abort/--strategy exclusivityJacob Keller, Aug 14, 2015
  7. 3/4 notes: add notes.mergestrategy option to select default strategyJacob Keller, Aug 14, 2015
  8. Johan HerlandAug 15, 2015
  9. 4/4 notes: teach git-notes about notes.<ref>.mergestrategy optionJacob Keller, Aug 14, 2015
  10. Junio C HamanoAug 14, 2015
  11. Eric SunshineAug 14, 2015
  12. Jacob KellerAug 14, 2015
  13. Junio C HamanoAug 17, 2015
  14. Jacob KellerAug 14, 2015
  15. Junio C HamanoAug 17, 2015
  16. Johan HerlandAug 15, 2015

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.