commit/status: check $GIT_DIR/MERGE_HEAD only once
commit309883015ff3af6ce14ff9fe401e06cfce8adb13
authorJunio C Hamano <gitster@pobox.com>
Sat, 12 Dec 2009 07:45:24 +0000 (11 23:45 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 12 Dec 2009 08:47:02 +0000 (12 00:47 -0800)
tree2c9d2d7a03a3627a2cec39871b00f1b81cfc6dae
parent68cfc6f551a02d29a2bc48c6473fad6ab42a476f
commit/status: check $GIT_DIR/MERGE_HEAD only once

The code checked for the MERGE_HEAD file to see if we were about
to commit a merge twice in the codepath; also one of them used a
variable merge_head_sha1[] which was set but was never used.

Just check it once, but do so also in "git status", too, as
we will be using this for status generation in the next patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c