Skip to content

Commit 3b6aeb3

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ea3d988 commit 3b6aeb3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

builtin-commit.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ static enum {
6868
static char *cleanup_arg;
6969

7070
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;
7373

7474
static int opt_parse_m(const struct option *opt, const char *arg, int unset)
7575
{
@@ -78,8 +78,7 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
7878
strbuf_setlen(buf, 0);
7979
else {
8080
strbuf_addstr(buf, arg);
81-
strbuf_addch(buf, '\n');
82-
strbuf_addch(buf, '\n');
81+
strbuf_addstr(buf, "\n\n");
8382
}
8483
return 0;
8584
}

0 commit comments

Comments
 (0)