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

Re: What's new in git.git master branch

From
Junio C Hamano <junkio@cox.net>
Date
Dec 1, 2005, 09:38 UTC
Message-ID
<7vmzjljgwo.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051201085433.GA7866@c165.ib.student.liu.se>
Fredrik Kuivinen <freku045@student.liu.se> writes:
Show 6 quoted lines
> It turns out that this change breaks the directory/file conflict
> handling in git-merge-recursive.
>
>    git-ls-tree -r -z <tree SHA1>
>
> Should we do it that way or should ls-tree be changed?

Ouch. Sorry, I should have been more careful. For this particular one, I think updating merge-recursive is less work, so for now I'd vote for that approach. However, as you might already be aware, I am not convinced that the new behaviour is better than the previous round (there is no question about the implementation quality and the clean-up value the rewrite brings), so we might want to also add the "show tree entry in recursive cases too" option to ls-tree as well. What I am saying is essentially, "why not do both?" ;-).

I was looking at the merge-recursive, and there is another topic I wanted to discuss with you about. Conflicts in renaming merges and index collapsing. The latest merge-one-file leaves index entries uncollapsed when the file content changes cannot be automerged, and I think we would want to match that in merge-recursive. When there is no rename involved it can do the same thing as merge-one-file does -- just leave the index unmerged. Renaming case is different.

Currently, rename result is recorded by using "git-update-index --cacheinfo" to populate the index. This method unfortunately can only create a stage0 entry. We can go two ways. One way is to support "register this mode/sha1 tuple at stageN for path" to update-index. Another would be for merge-recursive to first construct three trees with the final directory structure (i.e. prepare three temporary trees with renames applied) and run read-tree 3-way merge on these temporary trees. I suspect the former is probably of lesser impact. Thoughts?

Also I think I broke the case where base trees need to be merged in 58cce8a8 commit (I changed processEntry not to collapse the index entry when file content changes cannot be automerged, but that change has to be done only for the final merge, and merges between base trees must collapse to be able to write the index file out as a tree).

Previous: Fredrik KuivinenNext: Junio C Hamano
Message 3 of 15 in “What's new in git.git master branch”
  1. Junio C HamanoNov 30, 2005
  2. Fredrik KuivinenDec 1, 2005
  3. Junio C HamanoDec 1, 2005
  4. Junio C HamanoDec 2, 2005
  5. Junio C HamanoDec 2, 2005
  6. Fredrik KuivinenDec 2, 2005
  7. Fredrik KuivinenDec 2, 2005
  8. 3/3 update-index: allow --index-info to add higher stages.Junio C Hamano, Dec 7, 2005
  9. git-ls-tree: add "-t" option to always show the tree entriesLinus Torvalds, Dec 1, 2005
  10. Junio C HamanoDec 1, 2005
  11. Linus TorvaldsDec 1, 2005
  12. Junio C HamanoDec 1, 2005
  13. ls-tree: --name-onlyJunio C Hamano, Dec 1, 2005
  14. Junio C HamanoDec 2, 2005
  15. Linus TorvaldsDec 2, 2005

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.