Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-10 01:37:14 +0400
committerJunio C Hamano <gitster@pobox.com>2011-12-10 01:37:14 +0400
commitb7f7c07977ab6e41899b835b873a1ac499eaa2b3 (patch)
tree9b20151eb2b1a325ed2c72c22fad41616d8d98db /builtin/fmt-merge-msg.c
parenteb8aa3d2c2849cb3a44396b89054339df38e2bfa (diff)
parentd5a35c114ab6b4337a1c7598bf75c331d94ee092 (diff)
Merge branch 'nd/resolve-ref'
* nd/resolve-ref: Copy resolve_ref() return value for longer use Convert many resolve_ref() calls to read_ref*() and ref_exists() Conflicts: builtin/fmt-merge-msg.c builtin/merge.c refs.c
Diffstat (limited to 'builtin/fmt-merge-msg.c')
-rw-r--r--builtin/fmt-merge-msg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index ed95349b42..bdfa0ea05d 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -379,6 +379,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
die("No current branch");
if (!prefixcmp(current_branch, "refs/heads/"))
current_branch += 11;
+ current_branch = xstrdup(current_branch);
/* get a line */
while (pos < in->len) {
@@ -420,6 +421,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
}
strbuf_complete_line(out);
+ free((char *)current_branch);
return 0;
}