@@ -78,7 +78,7 @@ static void cache_one_alternate(const char *refname,
78
78
void * vcache )
79
79
{
80
80
struct alternate_object_cache * cache = vcache ;
81
- struct object * obj = parse_object (oid -> hash );
81
+ struct object * obj = parse_object (oid );
82
82
83
83
if (!obj || (obj -> flags & ALTERNATE ))
84
84
return ;
@@ -120,7 +120,7 @@ static void rev_list_push(struct commit *commit, int mark)
120
120
121
121
static int rev_list_insert_ref (const char * refname , const struct object_id * oid )
122
122
{
123
- struct object * o = deref_tag (parse_object (oid -> hash ), refname , 0 );
123
+ struct object * o = deref_tag (parse_object (oid ), refname , 0 );
124
124
125
125
if (o && o -> type == OBJ_COMMIT )
126
126
rev_list_push ((struct commit * )o , SEEN );
@@ -137,7 +137,7 @@ static int rev_list_insert_ref_oid(const char *refname, const struct object_id *
137
137
static int clear_marks (const char * refname , const struct object_id * oid ,
138
138
int flag , void * cb_data )
139
139
{
140
- struct object * o = deref_tag (parse_object (oid -> hash ), refname , 0 );
140
+ struct object * o = deref_tag (parse_object (oid ), refname , 0 );
141
141
142
142
if (o && o -> type == OBJ_COMMIT )
143
143
clear_commit_marks ((struct commit * )o ,
@@ -426,7 +426,7 @@ static int find_common(struct fetch_pack_args *args,
426
426
if (!lookup_object (oid .hash ))
427
427
die (_ ("object not found: %s" ), line );
428
428
/* make sure that it is parsed as shallow */
429
- if (!parse_object (oid . hash ))
429
+ if (!parse_object (& oid ))
430
430
die (_ ("error in object: %s" ), line );
431
431
if (unregister_shallow (& oid ))
432
432
die (_ ("no shallow found: %s" ), line );
@@ -557,14 +557,14 @@ static struct commit_list *complete;
557
557
558
558
static int mark_complete (const struct object_id * oid )
559
559
{
560
- struct object * o = parse_object (oid -> hash );
560
+ struct object * o = parse_object (oid );
561
561
562
562
while (o && o -> type == OBJ_TAG ) {
563
563
struct tag * t = (struct tag * ) o ;
564
564
if (!t -> tagged )
565
565
break ; /* broken repository */
566
566
o -> flags |= COMPLETE ;
567
- o = parse_object (t -> tagged -> oid . hash );
567
+ o = parse_object (& t -> tagged -> oid );
568
568
}
569
569
if (o && o -> type == OBJ_COMMIT ) {
570
570
struct commit * commit = (struct commit * )o ;
@@ -681,7 +681,7 @@ static int everything_local(struct fetch_pack_args *args,
681
681
if (!has_object_file (& ref -> old_oid ))
682
682
continue ;
683
683
684
- o = parse_object (ref -> old_oid . hash );
684
+ o = parse_object (& ref -> old_oid );
685
685
if (!o )
686
686
continue ;
687
687
0 commit comments