summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-19 16:05:50 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-19 16:05:50 -0800
commit2e05710a161e6287f239fae42b86b0cb46190834 (patch)
treea2dd4d1acc86d20f7888ee4f09f7d54d600ff33e /branch.c
parentb8fc5abd73e2e81c396844c09e8003de320709e5 (diff)
parent8cad4744ee37ebec1d9491a1381ec1771a1ba795 (diff)
downloadgit-2e05710a161e6287f239fae42b86b0cb46190834.tar.gz
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()
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index c2e625f40c..9971820a18 100644
--- a/branch.c
+++ b/branch.c
@@ -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.");
}