@@ -51,7 +51,8 @@ static void mark_blob_uninteresting(struct blob *blob)
51
51
blob -> object .flags |= UNINTERESTING ;
52
52
}
53
53
54
- static void mark_tree_contents_uninteresting (struct tree * tree )
54
+ static void mark_tree_contents_uninteresting (struct repository * r ,
55
+ struct tree * tree )
55
56
{
56
57
struct tree_desc desc ;
57
58
struct name_entry entry ;
@@ -63,10 +64,10 @@ static void mark_tree_contents_uninteresting(struct tree *tree)
63
64
while (tree_entry (& desc , & entry )) {
64
65
switch (object_type (entry .mode )) {
65
66
case OBJ_TREE :
66
- mark_tree_uninteresting (lookup_tree (the_repository , entry .oid ));
67
+ mark_tree_uninteresting (r , lookup_tree (r , entry .oid ));
67
68
break ;
68
69
case OBJ_BLOB :
69
- mark_blob_uninteresting (lookup_blob (the_repository , entry .oid ));
70
+ mark_blob_uninteresting (lookup_blob (r , entry .oid ));
70
71
break ;
71
72
default :
72
73
/* Subproject commit - not in this repository */
@@ -81,7 +82,7 @@ static void mark_tree_contents_uninteresting(struct tree *tree)
81
82
free_tree_buffer (tree );
82
83
}
83
84
84
- void mark_tree_uninteresting (struct tree * tree )
85
+ void mark_tree_uninteresting (struct repository * r , struct tree * tree )
85
86
{
86
87
struct object * obj ;
87
88
@@ -92,7 +93,7 @@ void mark_tree_uninteresting(struct tree *tree)
92
93
if (obj -> flags & UNINTERESTING )
93
94
return ;
94
95
obj -> flags |= UNINTERESTING ;
95
- mark_tree_contents_uninteresting (tree );
96
+ mark_tree_contents_uninteresting (r , tree );
96
97
}
97
98
98
99
struct commit_stack {
@@ -198,7 +199,7 @@ void add_head_to_pending(struct rev_info *revs)
198
199
struct object * obj ;
199
200
if (get_oid ("HEAD" , & oid ))
200
201
return ;
201
- obj = parse_object (the_repository , & oid );
202
+ obj = parse_object (revs -> repo , & oid );
202
203
if (!obj )
203
204
return ;
204
205
add_pending_object (revs , obj , "HEAD" );
@@ -210,7 +211,7 @@ static struct object *get_reference(struct rev_info *revs, const char *name,
210
211
{
211
212
struct object * object ;
212
213
213
- object = parse_object (the_repository , oid );
214
+ object = parse_object (revs -> repo , oid );
214
215
if (!object ) {
215
216
if (revs -> ignore_missing )
216
217
return object ;
@@ -247,7 +248,7 @@ static struct commit *handle_commit(struct rev_info *revs,
247
248
add_pending_object (revs , object , tag -> tag );
248
249
if (!tag -> tagged )
249
250
die ("bad tag" );
250
- object = parse_object (the_repository , & tag -> tagged -> oid );
251
+ object = parse_object (revs -> repo , & tag -> tagged -> oid );
251
252
if (!object ) {
252
253
if (revs -> ignore_missing_links || (flags & UNINTERESTING ))
253
254
return NULL ;
@@ -297,7 +298,7 @@ static struct commit *handle_commit(struct rev_info *revs,
297
298
if (!revs -> tree_objects )
298
299
return NULL ;
299
300
if (flags & UNINTERESTING ) {
300
- mark_tree_contents_uninteresting (tree );
301
+ mark_tree_contents_uninteresting (revs -> repo , tree );
301
302
return NULL ;
302
303
}
303
304
add_pending_object_with_path (revs , object , name , mode , path );
@@ -1253,7 +1254,7 @@ static void handle_one_reflog_commit(struct object_id *oid, void *cb_data)
1253
1254
{
1254
1255
struct all_refs_cb * cb = cb_data ;
1255
1256
if (!is_null_oid (oid )) {
1256
- struct object * o = parse_object (the_repository , oid );
1257
+ struct object * o = parse_object (cb -> all_revs -> repo , oid );
1257
1258
if (o ) {
1258
1259
o -> flags |= cb -> all_flags ;
1259
1260
/* ??? CMDLINEFLAGS ??? */
@@ -1312,7 +1313,7 @@ void add_reflogs_to_pending(struct rev_info *revs, unsigned flags)
1312
1313
1313
1314
cb .all_revs = revs ;
1314
1315
cb .all_flags = flags ;
1315
- cb .refs = get_main_ref_store (the_repository );
1316
+ cb .refs = get_main_ref_store (revs -> repo );
1316
1317
for_each_reflog (handle_one_reflog , & cb );
1317
1318
1318
1319
if (!revs -> single_worktree )
@@ -1326,7 +1327,7 @@ static void add_cache_tree(struct cache_tree *it, struct rev_info *revs,
1326
1327
int i ;
1327
1328
1328
1329
if (it -> entry_count >= 0 ) {
1329
- struct tree * tree = lookup_tree (the_repository , & it -> oid );
1330
+ struct tree * tree = lookup_tree (revs -> repo , & it -> oid );
1330
1331
add_pending_object_with_path (revs , & tree -> object , "" ,
1331
1332
040000 , path -> buf );
1332
1333
}
@@ -1352,7 +1353,7 @@ static void do_add_index_objects_to_pending(struct rev_info *revs,
1352
1353
if (S_ISGITLINK (ce -> ce_mode ))
1353
1354
continue ;
1354
1355
1355
- blob = lookup_blob (the_repository , & ce -> oid );
1356
+ blob = lookup_blob (revs -> repo , & ce -> oid );
1356
1357
if (!blob )
1357
1358
die ("unable to add index blob to traversal" );
1358
1359
add_pending_object_with_path (revs , & blob -> object , "" ,
@@ -1585,8 +1586,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot,
1585
1586
* dotdot = '\0' ;
1586
1587
}
1587
1588
1588
- a_obj = parse_object (the_repository , & a_oid );
1589
- b_obj = parse_object (the_repository , & b_oid );
1589
+ a_obj = parse_object (revs -> repo , & a_oid );
1590
+ b_obj = parse_object (revs -> repo , & b_oid );
1590
1591
if (!a_obj || !b_obj )
1591
1592
return dotdot_missing (arg , dotdot , revs , symmetric );
1592
1593
@@ -1599,8 +1600,8 @@ static int handle_dotdot_1(const char *arg, char *dotdot,
1599
1600
struct commit * a , * b ;
1600
1601
struct commit_list * exclude ;
1601
1602
1602
- a = lookup_commit_reference (the_repository , & a_obj -> oid );
1603
- b = lookup_commit_reference (the_repository , & b_obj -> oid );
1603
+ a = lookup_commit_reference (revs -> repo , & a_obj -> oid );
1604
+ b = lookup_commit_reference (revs -> repo , & b_obj -> oid );
1604
1605
if (!a || !b )
1605
1606
return dotdot_missing (arg , dotdot , revs , symmetric );
1606
1607
@@ -2208,7 +2209,7 @@ static int handle_revision_pseudo_opt(const char *submodule,
2208
2209
BUG ("--single-worktree cannot be used together with submodule" );
2209
2210
refs = get_submodule_ref_store (submodule );
2210
2211
} else
2211
- refs = get_main_ref_store (the_repository );
2212
+ refs = get_main_ref_store (revs -> repo );
2212
2213
2213
2214
/*
2214
2215
* NOTE!
@@ -2889,9 +2890,10 @@ void reset_revision_walk(void)
2889
2890
static int mark_uninteresting (const struct object_id * oid ,
2890
2891
struct packed_git * pack ,
2891
2892
uint32_t pos ,
2892
- void * unused )
2893
+ void * cb )
2893
2894
{
2894
- struct object * o = parse_object (the_repository , oid );
2895
+ struct rev_info * revs = cb ;
2896
+ struct object * o = parse_object (revs -> repo , oid );
2895
2897
o -> flags |= UNINTERESTING | SEEN ;
2896
2898
return 0 ;
2897
2899
}
@@ -2924,7 +2926,7 @@ int prepare_revision_walk(struct rev_info *revs)
2924
2926
revs -> treesame .name = "treesame" ;
2925
2927
2926
2928
if (revs -> exclude_promisor_objects ) {
2927
- for_each_packed_object (mark_uninteresting , NULL ,
2929
+ for_each_packed_object (mark_uninteresting , revs ,
2928
2930
FOR_EACH_OBJECT_PROMISOR_ONLY );
2929
2931
}
2930
2932
0 commit comments