Paolo Bonzini <bonzini@xxxxxxx> writes: > Johannes Schindelin wrote: >> >> On Mon, 21 Jan 2008, Paolo Bonzini wrote: >> >>> This means that: 1) the commit may be aborted after editing the message >>> if there is a problem writing out the tree object (slight disadvantage); >> >> I consider this more than a slight disadvantage. I regularly take >> ages coming up with a good commit message, because I think that the >> overall time balance is better with me spending more time on the >> message, but every reader spending less time to guess what I meant. >> >> So I would be quite annoyed to edit a message, only to find out that >> for whatever reason the commit was not successful. > > Just to make it clearer, the piece of code that would have to fail, > for the behavior to change, is this: I suspect Dscho was worried about the case where he says "git commit", types message and then write-tree finds out that the index is still unmerged and the tree cannot be written out. And I'd be majorly annoyed if the "slight disadvange" was about that. > discard_cache(); > read_cache_from(index_file); > if (!active_cache_tree) > active_cache_tree = cache_tree(); > if (cache_tree_update(active_cache_tree, > active_cache, active_nr, 0, 0) < 0) { > rollback_index_files(); > die("Error building trees"); > } I think this _could_ error out if your index is unmerged. However, if you have other code to error out early upon unmeregd index before you collect the message from the editor, I think you are Ok. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html