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

Slightly obscure merge-file inconsistency

From
Charles Bailey <charles@hashpling.org>
Date
May 25, 2009, 00:21 UTC
Message-ID
<1243210874-18451-1-git-send-email-charles@hashpling.org>
This was spotted by someone on stackoverflow.com.

It seems that git merge-file will wipe the merged file in the degenerate case when all the inputs have identical contents. As far as I can tell this is a bug, albeit one which will never be triggered in practice because merge-file won't ever be called on files that are identical in base, local and remote versions.

I think that the problem is just an overzealous null check in xdl_merge. Certainly with the fix, the test suite still passes but there may be some use cases of xdl_merge that I'm not aware of that rely on the current behaviour.

http://stackoverflow.com/questions/903966/
Next: Charles Bailey
Message 1 of 5 in “Slightly obscure merge-file inconsistency”
  1. Charles BaileyMay 25, 2009
  2. 1/2 merge-file fails to output anything for a degenerate mergeCharles Bailey, May 25, 2009
  3. 2/2 Change xdl_merge to generate output even for null mergesCharles Bailey, May 25, 2009
  4. Johannes SchindelinMay 25, 2009
  5. Johannes SchindelinMay 25, 2009

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.