Skip to content

Commit de37d50

Browse files
bk2204gitster
authored andcommitted
sha1_name: convert internals of peel_onion to object_id
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent cf93982 commit de37d50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sha1_name.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ struct object *peel_to_type(const char *name, int namelen,
798798
static int peel_onion(const char *name, int len, unsigned char *sha1,
799799
unsigned lookup_flags)
800800
{
801-
unsigned char outer[20];
801+
struct object_id outer;
802802
const char *sp;
803803
unsigned int expected_type = 0;
804804
struct object *o;
@@ -846,10 +846,10 @@ static int peel_onion(const char *name, int len, unsigned char *sha1,
846846
else if (expected_type == OBJ_TREE)
847847
lookup_flags |= GET_SHA1_TREEISH;
848848

849-
if (get_sha1_1(name, sp - name - 2, outer, lookup_flags))
849+
if (get_sha1_1(name, sp - name - 2, outer.hash, lookup_flags))
850850
return -1;
851851

852-
o = parse_object(outer);
852+
o = parse_object(outer.hash);
853853
if (!o)
854854
return -1;
855855
if (!expected_type) {

0 commit comments

Comments
 (0)