[PATCH v5 0/4] notes mergestrategy configuration option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jacob Keller <jacob.keller@xxxxxxxxx>

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]