builtin-commit: Two trivial style-cleanups
Pierre Habouzit noticed that two variables were not static which should have been, and that adding "\n\n" is better than adding '\n' twice. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Jul 22, 2008 at 21:40 UTC
3b6aeb3cc37c8ef934850fb01e1de48e12cf3aac
1 file changed
+3
-4
builtin-commit.c
+3
-4
@@ -68,8 +68,8 @@ static enum {
68
static char *cleanup_arg;
69
70
static int use_editor = 1, initial_commit, in_merge;
71
-const char *only_include_assumed;
72
-struct strbuf message;
71
+static const char *only_include_assumed;
72
+static struct strbuf message;
73
74
static int opt_parse_m(const struct option *opt, const char *arg, int unset)
75
{
@@ -78,8 +78,7 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
78
strbuf_setlen(buf, 0);
79
else {
80
strbuf_addstr(buf, arg);
81
- strbuf_addch(buf, '\n');
82
- strbuf_addch(buf, '\n');
81
+ strbuf_addstr(buf, "\n\n");
82
}
83
return 0;
84
}