diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-10 01:37:14 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-10 01:37:14 +0400 |
commit | b7f7c07977ab6e41899b835b873a1ac499eaa2b3 (patch) | |
tree | 9b20151eb2b1a325ed2c72c22fad41616d8d98db /builtin/fmt-merge-msg.c | |
parent | eb8aa3d2c2849cb3a44396b89054339df38e2bfa (diff) | |
parent | d5a35c114ab6b4337a1c7598bf75c331d94ee092 (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.c | 2 |
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; } |