Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: Last mile for 1.0 · Linus Torvalds <torvalds@osdl.org> · 2016-06-15

Re: Last mile for 1.0

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:41:59

[ git list added back in, since I migth as well explain the thinking here ]

On Mon, 6 Jun 2005, Junio C Hamano wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help