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

Re: [BUG] merge-recursive triggered "BUG"

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 17, 2011, 21:45 UTC
Message-ID
<7vpqpp1kww.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v4o7260no.fsf@alter.siamese.dyndns.org>

To illustrate the issue a bit better, with this patch applied on top of the en/merge-recursive topic, we get the same errors:

    Merging:
    31734dd Renamed and modified
    virtual merge-branch-1
    found 1 common ancestor(s):
    13277ae Common commmit
    Skipped rename (merged same as existing)
    error: addinfo_cache failed for path 'rename'
    rename: unmerged (f00c965d8307308469e537302baa73048488f162)
    rename: unmerged (3bb459b831ea471b9cd1cbb7c6d54a74251a711b)
    rename: unmerged (f00c965d8307308469e537302baa73048488f162)
    fatal: git write-tree failed to write a tree

In the test case, the merge machinery should notice that the result of the merge structurally place the merge result in the path "rename", and the content of the resulting blob matches what our side already have, so we should end up with a clean merge in the index (the index has the same blob as the HEAD at path "rename"), keeping the updated contents in the working tree.

 t/t6022-merge-rename.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh
index 7d955c1..94b9c00 100755
--- a/t/t6022-merge-rename.sh
+++ b/t/t6022-merge-rename.sh
@@ -730,6 +730,7 @@ test_expect_success 'setup avoid unnecessary update, normal rename' '
 
 test_expect_success 'avoid unnecessary update, normal rename' '
 	git checkout -q avoid-unnecessary-update-1^0 &&
+	echo modified >>rename &&
 	test-chmtime =1000000000 rename &&
 	test-chmtime -v +0 rename >expect &&
 	git merge merge-branch-1 &&
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 9 in “[BUG] merge-recursive triggered "BUG"”
  1. Junio C HamanoMar 17, 2011
  2. Junio C HamanoMar 17, 2011
  3. merge-recursive: tweak magic band-aidJunio C Hamano, Mar 18, 2011
  4. Elijah NewrenMar 21, 2011
  5. Jay SoffianMay 20, 2011
  6. Jay SoffianMay 20, 2011
  7. Junio C HamanoMay 20, 2011
  8. Jay SoffianMay 20, 2011
  9. Jay SoffianMay 20, 2011

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.