Skip to content

implement notes.mergeStrategy

Jacob Keller git 8 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest6 patches 3 repliesIn review
  2. v88 patches 5 repliesSuperseded
  3. v74 patches 11 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v64 patches2 repliesSuperseded
v54 patches1 replySuperseded
v44 patches16 repliesSuperseded
v34 patches3 repliesSuperseded
v22 patches6 repliesSuperseded

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6notes: document cat_sort_uniq rewriteModeDocumentation/config.txt Documentation/git-notes.txt+5 -40 replies
2/6notes: extract enum notes_merge_strategy to notes-utils.hnotes-merge.h notes-utils.h+11 -70 replies
3/6note: extract parse_notes_merge_strategy to notes-utilsbuiltin/notes.c notes-utils.c notes-utils.h+20 -112 replies
4/6notes: add tests for --commit/--abort/--strategy exclusivityt/t3310-notes-merge-manual-resolve.sh+12 -00 replies
5/6notes: add notes.mergeStrategy option to select default strategyDocumentation/config.txt Documentation/git-notes.txt builtin/notes.c +1 more+76 -30 replies
6/6notes: teach git-notes about notes.<name>.mergeStrategy optionDocumentation/config.txt Documentation/git-notes.txt builtin/notes.c +1 more+64 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v9 yet.

Read the v9 thread

Cover letter [PATCH v9 0/6] implement notes.mergeStrategy

From: Jacob Keller <[email protected]>

This series implements mergeStrategy configuration options which take the same value as --strategy. This series does not change the allowed refs to merge from or to. There is a known limitation that you cannot merge from refs outside of refs/notes (precluding the use of such refs as refs/tracking/origin/notes/ and so forth).

- Changes since v8 -
* drop the rewrite and merge option patches, since rewrite names are not really equivalent to merge names (ours/theirs is flipped)
* change docs on notes.<name>.mergeStrategy

This series does *not* deal with:
* changes to which refs can be merged, init_notes_check already prevents git-notes-merge into refs outside of refs/notes*
* use of rewrite names for merge strategies, including even concatenate

Hopefully a future contributor will have some time to look at making re-write just use the notes merge instead of doing re-write by hand. This would also potentially allow for manual merges. This series does not begin down this road, since we do not want to limit what this future author is allowed to do with regards to rewrite and merge strategy names.

I think finally this series is good. It may be worth adding some test_expect_failures around merging from refs/tracking/origin/notes if we intend to ever allow notes merges from these sources.

Jacob Keller (6):
notes: document cat_sort_uniq rewriteMode
notes: extract enum notes_merge_strategy to notes-utils.h
note: extract parse_notes_merge_strategy to notes-utils
notes: add tests for --commit/--abort/--strategy exclusivity
notes: add notes.mergeStrategy option to select default strategy
notes: teach git-notes about notes.<name>.mergeStrategy option

 Documentation/config.txt              | 16 ++++++-
 Documentation/git-notes.txt           | 25 +++++++++--
 builtin/notes.c                       | 43 +++++++++++++------
 notes-merge.h                         | 10 ++---
 notes-utils.c                         | 18 ++++++++
 notes-utils.h                         |  9 ++++
 t/t3309-notes-merge-auto-resolve.sh   | 79 +++++++++++++++++++++++++++++++++++
 t/t3310-notes-merge-manual-resolve.sh | 12 ++++++
 8 files changed, 187 insertions(+), 25 deletions(-)
Signature · 1 line
2.5.0.280.g4aaba03