Skip to content

Commit

Permalink
show_ref(): convert local variable peeled to object_id
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 25, 2015
1 parent f0a011f commit a0cde90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/show-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int show_ref(const char *refname, const struct object_id *oid,
int flag, void *cbdata)
{
const char *hex;
unsigned char peeled[20];
struct object_id peeled;

if (show_head && !strcmp(refname, "HEAD"))
goto match;
Expand Down Expand Up @@ -82,8 +82,8 @@ static int show_ref(const char *refname, const struct object_id *oid,
if (!deref_tags)
return 0;

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

0 comments on commit a0cde90

Please sign in to comment.