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

Re: Last mile for 1.0

From
Linus Torvalds <torvalds@osdl.org>
Date
Jun 6, 2005, 14:47 UTC
Message-ID
<Pine.LNX.4.58.0506060738170.1876@ppc970.osdl.org>
In-Reply-To
<7vacm4ufnl.fsf@assigned-by-dhcp.cox.net>
[ git list added back in, since I migth as well explain the thinking here ]
On Mon, 6 Jun 2005, Junio C Hamano wrote:
Show 7 quoted lines
>
> I've sent you a reply in another thread, but I really think you
> need to make this "new merge world order" a bit more explicit.
> My understanding of your (earlier) wish was that you wanted the
> merge not to touch and look at any work tree material, but it
> appears to me that this round you actually expect the work tree
> be populated and more-or-less match the first head being merged.

Actually, no. I expect the old _index_ to be at least not _more_ populated than the trees I merge. That's not a working tree issue, that's a "we don't want to drop information from the index".

And yes, if you use "-u", it will populate the working tree too, but that's really totally unimportant from the algorithm itself.

But you can very much do everything in-index as before, if you want to. A pure index merge would be done usually in a new temporary index file, something like

  rm -f .git/tmp_index
  GIT_INDEX_FILE=.git/tmp_index git-read-tree -m <base> <merge1> <merge2>
and the new changes don't change that.

HOWEVER, it's all set up to be very clever indeed. My immediate goal is to make the current git-resolve-script be more easily usable, and that implies that it has to work in the current working directory and resolve conflicts there. I still think that the _long-term_ plan is to make sure that we don't do that, and the new thing actually supports that too.

For example, notice how I lifted all the "checkout" code from the checkout-cache thing? Including very much the code that supports "--prefix"? I didn't add the command line, but imagine just adding that, which updates "state.base_dir", and doing

	mkdir -p MERGE_DIR/.git
	cp .git/index MERGE_DIR/.git/index
	GIT_INDEX_FILE=MERGE_DIR/.git/index git-read-tree -u --prefix=MERGE_DIR/ <base> <merge1> <merge2>

and voila, you're basically now 75% of the way to where I wanted the thing to be in a separate directory.

So I've given up on the separate directory for 1.0 - because it's clearly not going to happen - but I've not given up on the basic idea.

			Linus
Previous: Linus TorvaldsNext: Junio C Hamano
Message 22 of 25 in “Documentation: describe git extended diff headers.”
  1. Documentation: describe git extended diff headers.Junio C Hamano, Jun 5, 2005
  2. Linus TorvaldsJun 5, 2005
  3. Fix diff.c to match rename extended header to the document.Junio C Hamano, Jun 5, 2005
  4. Fix apply.c to match rename extended header to the document.Junio C Hamano, Jun 5, 2005
  5. Linus TorvaldsJun 5, 2005
  6. Last mile for 1.0Junio C Hamano, Jun 5, 2005
  7. Junio C HamanoJun 5, 2005
  8. McMullan, JasonJun 6, 2005
  9. Linus TorvaldsJun 6, 2005
  10. git-whatchanged vs "cvs annotate"Junio C Hamano, Jun 6, 2005
  11. Thomas GlanzmannJun 6, 2005
  12. Linus TorvaldsJun 6, 2005
  13. Junio C HamanoJun 6, 2005
  14. Linus TorvaldsJun 6, 2005
  15. Thomas GlanzmannJun 6, 2005
  16. Linus TorvaldsJun 6, 2005
  17. Thomas GlanzmannJun 6, 2005
  18. Junio C HamanoJun 6, 2005
  19. Linus TorvaldsJun 6, 2005
  20. Junio C HamanoJun 6, 2005
  21. Linus TorvaldsJun 6, 2005
  22. Linus TorvaldsJun 6, 2005
  23. 3-way read-tree case matrix.Junio C Hamano, Jun 8, 2005
  24. Junio C HamanoJun 8, 2005
  25. Tests: read-tree -m test updates.Junio C Hamano, Jun 8, 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.