Dear diary, on Tue, Nov 29, 2005 at 07:46:20PM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that... > Petr Baudis <pasky@suse.cz> writes: > > > (ii) Cogito will handle trees with some local modifications better - > > basically any local modifications git-read-tree -m won't care about. > > I didn't read the whole conversation, so to reiterate: git-read-tree > > will complain when the index does not match the HEAD, but won't > > complain about modified files in the working tree if the merge is not > > going to touch them. Now, let's say you do this (output is visually > > only roughly or not at all resembling what would real tools tell you): > > > > $ ls > > a b c > > $ echo 'somelocalhack' >>a > > $ git merge "blah" HEAD remotehead > > File-level merge of 'b' and 'c'... > > Oops, 'b' contained local conflicts. > > Automatic merge aborted, fix up by hand. > > $ fixup b > > $ git commit > > Committed files 'a', 'b', 'c'. > > > > Oops. It grabbed your local hack and committed it along the merge. > > Are you sure about this? > > In the above sequence, after you touch a with 'somelocalhack', > there is no 'git update-index a', until you say 'git commit' > there, so I do not think that mixup is possible. > > The "fixup b" step is actually two commands, so after merge > command, you would do: > > $ edit b > $ git update-index b ;# mark that you are dealt with it > $ git commit ;# commits what is in index > > After the above steps, "git diff" (that is working tree against > index) still reports your local change to "a", which were _not_ > committed. Yes. I actually tried it out, but I was confused by the file list in the commit message (I'm used to seeing just committed files there) and I didn't check the status of the 'a' file after the commit. Sorry about the confusion. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Mon Dec 05 08:35:21 2005
This archive was generated by hypermail 2.1.8 : 2005-12-05 08:35:27 EST