aboutsummaryrefslogtreecommitdiffstats
path: root/ui-log.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-log.c b/ui-log.c
index 32b4c47..8028b27 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -249,11 +249,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
249 249
250static const char *disambiguate_ref(const char *ref, int *must_free_result) 250static const char *disambiguate_ref(const char *ref, int *must_free_result)
251{ 251{
252 unsigned char sha1[20]; 252 struct object_id oid;
253 struct strbuf longref = STRBUF_INIT; 253 struct strbuf longref = STRBUF_INIT;
254 254
255 strbuf_addf(&longref, "refs/heads/%s", ref); 255 strbuf_addf(&longref, "refs/heads/%s", ref);
256 if (get_sha1(longref.buf, sha1) == 0) { 256 if (get_sha1(longref.buf, oid.hash) == 0) {
257 *must_free_result = 1; 257 *must_free_result = 1;
258 return strbuf_detach(&longref, NULL); 258 return strbuf_detach(&longref, NULL);
259 } 259 }