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

@ -173,7 +173,7 @@ static int for_each_tag_name(const char **argv, each_tag_name_fn fn)
had_error = 1;
continue;
}
if (!resolve_ref(ref, sha1, 1, NULL)) {
if (read_ref(ref, sha1)) {
error(_("tag '%s' not found."), *p);
had_error = 1;
continue;
@ -454,7 +454,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
if (strbuf_check_tag_ref(&ref, tag))
die(_("'%s' is not a valid tag name."), tag);
if (!resolve_ref(ref.buf, prev, 1, NULL))
if (read_ref(ref.buf, prev))
hashclr(prev);
else if (!force)
die(_("tag '%s' already exists"), tag);