From: Michael J Gruber Date: Wed, 23 Aug 2017 12:10:45 +0000 (+0200) Subject: merge: save merge state earlier X-Git-Tag: v2.14.2~24^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9d89b35526b54c3ba33371b184a1ba6e30f8f46f?hp=9d89b35526b54c3ba33371b184a1ba6e30f8f46f merge: save merge state earlier If the `git merge` process is killed while waiting for the editor to finish, the merge state is lost but the prepared merge msg and tree is kept. So, a subsequent `git commit` creates a squashed merge even when the user asked for proper merge commit originally. Demonstrate the problem with a test crafted after the in t7502. The test requires EXECKEEPSPID (thus does not run under MINGW). Save the merge state earlier (in the non-squash case) so that it does not get lost. This makes the test pass. Reported-by: hIpPy Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano ---