summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-20 00:05:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-12-20 00:05:50 (GMT)
commit2e05710a161e6287f239fae42b86b0cb46190834 (patch)
treea2dd4d1acc86d20f7888ee4f09f7d54d600ff33e /builtin/log.c
parentb8fc5abd73e2e81c396844c09e8003de320709e5 (diff)
parent8cad4744ee37ebec1d9491a1381ec1771a1ba795 (diff)
downloadgit-2e05710a161e6287f239fae42b86b0cb46190834.zip
git-2e05710a161e6287f239fae42b86b0cb46190834.tar.gz
git-2e05710a161e6287f239fae42b86b0cb46190834.tar.bz2
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 'builtin/log.c')
-rw-r--r--builtin/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 4395f3e..89d0cc0 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1040,7 +1040,7 @@ static char *find_branch_name(struct rev_info *rev)
if (positive < 0)
return NULL;
strbuf_addf(&buf, "refs/heads/%s", rev->cmdline.rev[positive].name);
- branch = resolve_ref(buf.buf, branch_sha1, 1, NULL);
+ branch = resolve_ref_unsafe(buf.buf, branch_sha1, 1, NULL);
if (!branch ||
prefixcmp(branch, "refs/heads/") ||
hashcmp(rev->cmdline.rev[positive].item->sha1, branch_sha1))
@@ -1268,7 +1268,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
rev.pending.objects[0].item->flags |= UNINTERESTING;
add_head_to_pending(&rev);
- ref = resolve_ref("HEAD", sha1, 1, NULL);
+ ref = resolve_ref_unsafe("HEAD", sha1, 1, NULL);
if (ref && !prefixcmp(ref, "refs/heads/"))
branch_name = xstrdup(ref + strlen("refs/heads/"));
else