commit: don't start editor if empty message is given with -m
commit25206778aac776fc6cc4887653fdae476c7a9b5a
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 25 May 2013 21:43:34 +0000 (25 23:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 21:33:01 +0000 (28 14:33 -0700)
tree8e5d2d5caebaa9cf53e30381b9736e340ea7e5b3
parent92758dd2a2de94c90c0697ef0e8174c3543a47f9
commit: don't start editor if empty message is given with -m

If an empty message is specified with the option -m of git commit then
the editor is started.  That's unexpected and unnecessary.  Instead of
using the length of the message string for checking if the user
specified one, directly remember if the option -m was given.

Reported-by: Mislav Marohnić <mislav.marohnic@gmail.com>
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c
t/t7502-commit.sh