Browse Source

show_ref(): convert local variable peeled to object_id

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty 10 years ago committed by Junio C Hamano
parent
commit
a0cde90ebf
  1. 6
      builtin/show-ref.c

6
builtin/show-ref.c

@ -30,7 +30,7 @@ static int show_ref(const char *refname, const struct object_id *oid,
int flag, void *cbdata) int flag, void *cbdata)
{ {
const char *hex; const char *hex;
unsigned char peeled[20]; struct object_id peeled;


if (show_head && !strcmp(refname, "HEAD")) if (show_head && !strcmp(refname, "HEAD"))
goto match; goto match;
@ -82,8 +82,8 @@ match:
if (!deref_tags) if (!deref_tags)
return 0; return 0;


if (!peel_ref(refname, peeled)) { if (!peel_ref(refname, peeled.hash)) {
hex = find_unique_abbrev(peeled, abbrev); hex = find_unique_abbrev(peeled.hash, abbrev);
printf("%s %s^{}\n", hex, refname); printf("%s %s^{}\n", hex, refname);
} }
return 0; return 0;

Loading…
Cancel
Save