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:
Junio C Hamano
2011-12-09 13:37:14 -08:00
17 changed files with 98 additions and 59 deletions

View File

@ -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;
}