Merge branch 'nd/resolve-ref'

* nd/resolve-ref:
  Rename resolve_ref() to resolve_ref_unsafe()
  Convert resolve_ref+xstrdup to new resolve_refdup function
  revert: convert resolve_ref() to read_ref_full()
This commit is contained in:
Junio C Hamano
2011-12-19 16:05:50 -08:00
21 changed files with 73 additions and 76 deletions

View File

@ -181,7 +181,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref,
const char *head;
unsigned char sha1[20];
head = resolve_ref("HEAD", sha1, 0, NULL);
head = resolve_ref_unsafe("HEAD", sha1, 0, NULL);
if (!is_bare_repository() && head && !strcmp(head, ref->buf))
die("Cannot force update the current branch.");
}