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

[PATCH v5 0/4] notes mergestrategy configuration option

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 14, 2015, 17:50 UTC
Message-ID
<1439574620-25249-1-git-send-email-jacob.e.keller@intel.com>
From: Jacob Keller <jacob.keller@gmail.com>

I have tried to cover all of the comments since the last sending of this series. I am not 100% sure if I got everything, so please feel free to respond again if I missed something.

This series implements the notes.mergestrategy option, as well as a notes.<ref>.mergestrategy option which can be used to customize what strategy is used to merge into a particular ref. I chose to use the local ref instead of the remote reference, as it is most likely that you will merge into a given ref with the same strategy rather than always using the same strategy to merge from a ref.

The notes.<ref>.mergestrategy option uses the short name under refs/notes/ and does not allow arbitrary references. Today git-notes does not allow *any* arbitrary ref as a notes ref for either merge or any other operation, (see init_notes_check!). Due to this, we can force the config to use the shorthand name instead of the full name.

In the future we may wish to allow non-write operations to reference an arbitrary ref (such as refs/remote-notes/* or refs/tracking/*/notes/) but this is not today supported, and in anycase merge is a destructive write operation so it should always require refs/notes/ references.

Changes since v4
* renamed option to mergestrategy for both per-ref and general option
  for consistency and to keep the notes.merge and notes.<ref>.merge
  available as keys for future notes enhancements
* use shortrefs for notes.<ref>.mergestrategy
Jacob Keller (4):
  notes: document cat_sort_uniq rewriteMode
  notes: add tests for --commit/--abort/--strategy exclusivity
  notes: add notes.mergestrategy option to select default strategy
  notes: teach git-notes about notes.<ref>.mergestrategy option
 Documentation/config.txt              | 18 ++++++++--
 Documentation/git-notes.txt           | 23 ++++++++++--
 builtin/notes.c                       | 46 +++++++++++++++++-------
 notes-merge.h                         | 16 +++++----
 t/t3309-notes-merge-auto-resolve.sh   | 68 +++++++++++++++++++++++++++++++++++
 t/t3310-notes-merge-manual-resolve.sh | 12 +++++++
 6 files changed, 159 insertions(+), 24 deletions(-)
-- 
2.5.0.280.g4aaba03
Next: Jacob Keller
Message 1 of 6 in “notes mergestrategy configuration option”
  1. 0/4 notes mergestrategy configuration optionJacob Keller, Aug 14, 2015
  2. 1/4 notes: document cat_sort_uniq rewriteModeJacob Keller, Aug 14, 2015
  3. 2/4 notes: add tests for --commit/--abort/--strategy exclusivityJacob Keller, Aug 14, 2015
  4. 3/4 notes: add notes.mergestrategy option to select default strategyJacob Keller, Aug 14, 2015
  5. Eric SunshineAug 14, 2015
  6. 4/4 notes: teach git-notes about notes.<ref>.mergestrategy optionJacob Keller, Aug 14, 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.