git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/4] notes mergestrategy configuration option
@ 2015-08-14 17:50 Jacob Keller
  2015-08-14 17:50 ` [PATCH v5 1/4] notes: document cat_sort_uniq rewriteMode Jacob Keller
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jacob Keller @ 2015-08-14 17:50 UTC (permalink / raw)
  To: git
  Cc: Johan Herland, Michael Haggerty, Eric Sunshine, Junio C Hamano,
	Jacob Keller

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-14 18:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14 17:50 [PATCH v5 0/4] notes mergestrategy configuration option Jacob Keller
2015-08-14 17:50 ` [PATCH v5 1/4] notes: document cat_sort_uniq rewriteMode Jacob Keller
2015-08-14 17:50 ` [PATCH v5 2/4] notes: add tests for --commit/--abort/--strategy exclusivity Jacob Keller
2015-08-14 17:50 ` [PATCH v5 3/4] notes: add notes.mergestrategy option to select default strategy Jacob Keller
2015-08-14 18:07   ` Eric Sunshine
2015-08-14 17:50 ` [PATCH v5 4/4] notes: teach git-notes about notes.<ref>.mergestrategy option Jacob Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).