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

Re: CFT: merge-recursive in C (updated)

From
Junio C Hamano <junkio@cox.net>
Date
Jun 29, 2006, 02:41 UTC
Message-ID
<7vzmfwy97w.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060629002547.GA27507@steel.home>
fork0@t-online.de (Alex Riesen) writes:
Show 15 quoted lines
> this broke t6022-merge-rename.sh (the second test). It produces an
> index with this:
>
> .../t/trash$ git-diff-index white
> :100644 100644 2d603156dc5bdf6295c789cac08e3c9942a0b82a 0000000000000000000000000000000000000000 M      B
> :100644 100644 ba41fb96393979b22691106b06bf5231eab57b85 0000000000000000000000000000000000000000 M      N
>
> whereas git-merge-recursive (and the previous version, without pipe):
>
> .../t/trash$ git-diff-index white
> :100644 100644 2d603156dc5bdf6295c789cac08e3c9942a0b82a 0000000000000000000000000000000000000000 M      B
>
> I can see that "git update-index --add" is somehow different from a
> pipe to "git update-index --index-info", but not very clear. Does this
> "zero-sha1" mean that the file "N" is not in the index?

When diff-index and diff-files compare a tree entry or an index entry with a file in the working tree, they do not compute the blob hash value for the file in the working tree. 0{40} is used on the RHS in such a case. When the working tree file matches the corresponding index entry, then we know RHS matches what is in the index, so both sides have the blob hash value.

Previous: Alex RiesenNext: Alex Riesen
Message 11 of 32 in “CFT: merge-recursive in C (updated)”
  1. Alex RiesenJun 27, 2006
  2. Johannes SchindelinJun 27, 2006
  3. Alex RiesenJun 27, 2006
  4. Alex RiesenJun 28, 2006
  5. Johannes SchindelinJun 28, 2006
  6. Alex RiesenJun 28, 2006
  7. Johannes SchindelinJun 28, 2006
  8. Alex RiesenJun 28, 2006
  9. Johannes SchindelinJun 28, 2006
  10. Alex RiesenJun 29, 2006
  11. Junio C HamanoJun 29, 2006
  12. Alex RiesenJun 29, 2006
  13. Johannes SchindelinJun 29, 2006
  14. Alex RiesenJun 29, 2006
  15. Johannes SchindelinJun 29, 2006
  16. 1/2 refactor merge_bases() as preparation to libify merge-baseJohannes Schindelin, Jun 29, 2006
  17. move get_merge_bases() to core lib; use it in merge-recursiveJohannes Schindelin, Jun 29, 2006
  18. Johannes SchindelinJun 29, 2006
  19. Alex RiesenJun 29, 2006
  20. Johannes SchindelinJun 29, 2006
  21. Alex RiesenJun 29, 2006
  22. Alex RiesenJun 29, 2006
  23. Johannes SchindelinJun 29, 2006
  24. Linus TorvaldsJun 29, 2006
  25. Junio C HamanoJun 29, 2006
  26. Johannes SchindelinJun 29, 2006
  27. Junio C HamanoJun 29, 2006
  28. Alex RiesenJun 30, 2006
  29. Linus TorvaldsJun 27, 2006
  30. Johannes SchindelinJun 27, 2006
  31. Linus TorvaldsJun 27, 2006
  32. Alex RiesenJun 27, 2006

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.