merge: split write_merge_state in two
commit8e6a6bb36037da87ac98da280459269168b9f525
authorMichael J Gruber <git@grubix.eu>
Wed, 23 Aug 2017 12:10:44 +0000 (23 14:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Aug 2017 17:34:57 +0000 (23 10:34 -0700)
tree3ccce8bed8d1251db8c735b2edf26b1bfa6c059e
parent62dc42b9370b123924ba3423d51976e78d13a924
merge: split write_merge_state in two

write_merge_state() writes out the merge heads, mode, and msg. But we
may want to write out heads, mode without the msg. So, split out heads
(+mode) into a separate function write_merge_heads() that is called by
write_merge_state().

No funtional change so far, except when these non-atomic writes are
interrupted: we write heads-mode-msg now when we used to write
heads-msg-mode.

Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c