Skip to content

Rescuing repeated merge of Documentation/git-merge.txt

Junio C Hamano git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8git_attr(): fix function signaturearchive.c attr.c attr.h +6 more+19 -140 replies
2/8xdl_merge(): introduce xmparam_t for merge specific parametersbuiltin-merge-file.c ll-merge.c merge-file.c +3 more+17 -120 replies
3/8xdl_merge(): allow passing down marker_size in xmparam_txdiff/xdiff.h xdiff/xmerge.c+18 -80 replies
4/8merge-tree: use ll_merge() not xdl_merge()merge-file.c merge-tree.c+9 -110 replies
5/8rerere: use ll_merge() instead of using xdl_merge()rerere.c+1 -43 replies
6/8conflict-marker-size: new attributell-merge.c+34 -250 replies
7/8rerere: prepare for customizable conflict marker lengthrerere.c+41 -100 replies
8/8rerere: honor conflict-marker-size attributell-merge.c ll-merge.h rerere.c+20 -20 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/8] Rescuing repeated merge of Documentation/git-merge.txt

Ever since I started queuing Thomas's documentation updates in 'pu', rebuilding the branch involved manual re-integration for conflicts in Documentation/git-merge.txt. This is because the tracked contents in the file has lines that exactly match the conflict marker patterns (of course, they are examples of how conflicts are shown).

I am not blaming Thomas; the blame lies squarely on the inability of 'rerere' to deal with such a situation. It often is enough to do:

git diff pu@{4.hours} Documentation/git-merge.txt

to check that nothing else has changed since the last merge, and then

git co pu@{4.hours} Documentation/git-merge.txt

to resurrect the previous result, but it still is irritating.

This series is to help me cope with this particular merge by allowing the attribute mechanism. By having this entry in my .git/info/attributes:

Documentation/git-merge.txt conflict-marker-size=32

"git merge" leaves conflict markers that are 32 chars long (instead of the usual 7), "git rerere" that is run internally when "git merge" results in conflicts sees only the real conflict markers as such without getting confused by the example in the contents, and "git rerere" called to record the resolution does the right thing.

Junio C Hamano (8):
git_attr(): fix function signature
xdl_merge(): introduce xmparam_t for merge specific parameters xdl_merge(): allow passing down marker_size in xmparam_t
merge-tree: use ll_merge() not xdl_merge()
rerere: use ll_merge() instead of using xdl_merge()
conflict-marker-size: new attribute
rerere: prepare for customizable conflict marker length
rerere: honor conflict-marker-size attribute

 archive.c              |    4 +-
 attr.c                 |   11 +++++--
 attr.h                 |    2 +-
 builtin-check-attr.c   |    2 +-
 builtin-merge-file.c   |    4 +-
 builtin-pack-objects.c |    2 +-
 convert.c              |    6 ++--
 ll-merge.c             |   80 +++++++++++++++++++++++++++++++-----------------
 ll-merge.h             |    2 +
 merge-file.c           |   16 ++++-----
 merge-tree.c           |    4 +-
 rerere.c               |   57 +++++++++++++++++++++++++--------
 userdiff.c             |    2 +-
 ws.c                   |    2 +-
 xdiff/xdiff.h          |    9 +++++-
 xdiff/xmerge.c         |   26 ++++++++++-----
 16 files changed, 151 insertions(+), 78 deletions(-)