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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 17, 2010, 09:38 UTC
Message-ID
<1263721144-18605-1-git-send-email-gitster@pobox.com>

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(-)
Next: Junio C Hamano
Message 1 of 13 in “Rescuing repeated merge of Documentation/git-merge.txt”
  1. 0/8 Rescuing repeated merge of Documentation/git-merge.txtJunio C Hamano, Jan 17, 2010
  2. 1/8 git_attr(): fix function signatureJunio C Hamano, Jan 17, 2010
  3. 2/8 xdl_merge(): introduce xmparam_t for merge specific parametersJunio C Hamano, Jan 17, 2010
  4. 3/8 xdl_merge(): allow passing down marker_size in xmparam_tJunio C Hamano, Jan 17, 2010
  5. 4/8 merge-tree: use ll_merge() not xdl_merge()Junio C Hamano, Jan 17, 2010
  6. 5/8 rerere: use ll_merge() instead of using xdl_merge()Junio C Hamano, Jan 17, 2010
  7. Johannes SixtJan 17, 2010
  8. Junio C HamanoJan 17, 2010
  9. Johannes SixtJan 17, 2010
  10. 6/8 conflict-marker-size: new attributeJunio C Hamano, Jan 17, 2010
  11. 7/8 rerere: prepare for customizable conflict marker lengthJunio C Hamano, Jan 17, 2010
  12. 8/8 rerere: honor conflict-marker-size attributeJunio C Hamano, Jan 17, 2010
  13. Junio C HamanoJan 17, 2010

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.