summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-12-28 11:42:46 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-12-28 11:42:46 -0800
commitb42e81afe2d98faee7728ef02a558847fd08cf90 (patch)
tree3e80d1b14ed8697734b5e07a3da828b4a48b16bf
parentMerge branch 'jk/maint-push-v-is-verbose' into maint (diff)
parentUpdate jk/maint-strbuf-missing-init to builtin/ rename (diff)
downloadtgif-b42e81afe2d98faee7728ef02a558847fd08cf90.tar.xz
Merge branch 'jk/maint-strbuf-missing-init' into maint
* jk/maint-strbuf-missing-init: commit, merge: initialize static strbuf
-rw-r--r--builtin/commit.c2
-rw-r--r--builtin/merge.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index b02e2c4e89..d8d6dd5eaa 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -103,7 +103,7 @@ static enum commit_whence whence;
static int use_editor = 1, include_status = 1;
static int show_ignored_in_status;
static const char *only_include_assumed;
-static struct strbuf message;
+static struct strbuf message = STRBUF_INIT;
static int null_termination;
static enum {
diff --git a/builtin/merge.c b/builtin/merge.c
index 1387376248..7d92e2064b 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -48,7 +48,7 @@ static int show_diffstat = 1, shortlog_len, squash;
static int option_commit = 1, allow_fast_forward = 1;
static int fast_forward_only, option_edit;
static int allow_trivial = 1, have_message;
-static struct strbuf merge_msg;
+static struct strbuf merge_msg = STRBUF_INIT;
static struct commit_list *remoteheads;
static struct strategy **use_strategies;
static size_t use_strategies_nr, use_strategies_alloc;