summaryrefslogtreecommitdiff
path: root/builtin-commit.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-07-22 20:40:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-23 23:57:14 (GMT)
commit3b6aeb3cc37c8ef934850fb01e1de48e12cf3aac (patch)
tree59873689c28fb0659de86b6ac025843d9f77a6ee /builtin-commit.c
parentea3d988df7b0985fa164c7ace13e4c961c607a22 (diff)
downloadgit-3b6aeb3cc37c8ef934850fb01e1de48e12cf3aac.zip
git-3b6aeb3cc37c8ef934850fb01e1de48e12cf3aac.tar.gz
git-3b6aeb3cc37c8ef934850fb01e1de48e12cf3aac.tar.bz2
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>
Diffstat (limited to 'builtin-commit.c')
-rw-r--r--builtin-commit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin-commit.c b/builtin-commit.c
index 97e64de..7434797 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -68,8 +68,8 @@ static enum {
static char *cleanup_arg;
static int use_editor = 1, initial_commit, in_merge;
-const char *only_include_assumed;
-struct strbuf message;
+static const char *only_include_assumed;
+static struct strbuf message;
static int opt_parse_m(const struct option *opt, const char *arg, int unset)
{
@@ -78,8 +78,7 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
strbuf_setlen(buf, 0);
else {
strbuf_addstr(buf, arg);
- strbuf_addch(buf, '\n');
- strbuf_addch(buf, '\n');
+ strbuf_addstr(buf, "\n\n");
}
return 0;
}