git/builtin
Jay Soffian 9fa8aecdeb revert.c: defer writing CHERRY_PICK_HEAD till it is safe to do so
do_pick_commit() writes out CHERRY_PICK_HEAD before invoking merge (either
via do_recursive_merge() or try_merge_command()) on the assumption that if
the merge fails it is due to conflict. However, if the tree is dirty, the
merge may not even start, aborting before do_pick_commit() can remove
CHERRY_PICK_HEAD.

Instead, defer writing CHERRY_PICK_HEAD till after merge has returned.
At this point we know the merge has either succeeded or failed due
to conflict. In either case, we want CHERRY_PICK_HEAD to be written
so that it may be picked up by the subsequent invocation of commit.

Note that do_recursive_merge() aborts if the merge cannot start, while
try_merge_command() returns a non-zero value other than 1.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-06 16:56:34 -07:00
..
2011-05-31 12:19:11 -07:00
2011-06-20 14:27:36 -07:00
2011-05-31 12:19:11 -07:00
2011-06-20 14:27:36 -07:00
2011-06-08 17:21:08 -07:00
2011-05-30 00:00:07 -07:00
2011-05-31 12:19:11 -07:00
2011-05-31 12:19:11 -07:00
2011-05-31 12:19:11 -07:00
2011-05-31 12:19:11 -07:00