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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user