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. Maybe you were mistaken because Cogito tries to be nice to its users and always does a moral equivalent of "git commit -a" (unless the user tells you to commit only specific paths), but you needed to special case merge resolution commit to make sure that you exclude "a" in the above example? "git commit" does not do "-a" by default, and it will stay that way, so I do not think we do not have the "Oops" you described above. "Oops" would happen only if you did "git commit -a" instead at the last step. - 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 Wed Nov 30 05:46:56 2005
This archive was generated by hypermail 2.1.8 : 2005-11-30 05:47:02 EST