@@ -104,17 +104,12 @@ static void mark_blob_uninteresting(struct blob *blob)
104
104
blob -> object .flags |= UNINTERESTING ;
105
105
}
106
106
107
- void mark_tree_uninteresting (struct tree * tree )
107
+ static void mark_tree_contents_uninteresting (struct tree * tree )
108
108
{
109
109
struct tree_desc desc ;
110
110
struct name_entry entry ;
111
111
struct object * obj = & tree -> object ;
112
112
113
- if (!tree )
114
- return ;
115
- if (obj -> flags & UNINTERESTING )
116
- return ;
117
- obj -> flags |= UNINTERESTING ;
118
113
if (!has_sha1_file (obj -> sha1 ))
119
114
return ;
120
115
if (parse_tree (tree ) < 0 )
@@ -142,6 +137,18 @@ void mark_tree_uninteresting(struct tree *tree)
142
137
free_tree_buffer (tree );
143
138
}
144
139
140
+ void mark_tree_uninteresting (struct tree * tree )
141
+ {
142
+ struct object * obj = & tree -> object ;
143
+
144
+ if (!tree )
145
+ return ;
146
+ if (obj -> flags & UNINTERESTING )
147
+ return ;
148
+ obj -> flags |= UNINTERESTING ;
149
+ mark_tree_contents_uninteresting (tree );
150
+ }
151
+
145
152
void mark_parents_uninteresting (struct commit * commit )
146
153
{
147
154
struct commit_list * parents = NULL , * l ;
@@ -276,6 +283,7 @@ static struct commit *handle_commit(struct rev_info *revs,
276
283
return NULL ;
277
284
die ("bad object %s" , sha1_to_hex (tag -> tagged -> sha1 ));
278
285
}
286
+ object -> flags |= flags ;
279
287
}
280
288
281
289
/*
@@ -287,7 +295,6 @@ static struct commit *handle_commit(struct rev_info *revs,
287
295
if (parse_commit (commit ) < 0 )
288
296
die ("unable to parse commit %s" , name );
289
297
if (flags & UNINTERESTING ) {
290
- commit -> object .flags |= UNINTERESTING ;
291
298
mark_parents_uninteresting (commit );
292
299
revs -> limited = 1 ;
293
300
}
@@ -305,7 +312,7 @@ static struct commit *handle_commit(struct rev_info *revs,
305
312
if (!revs -> tree_objects )
306
313
return NULL ;
307
314
if (flags & UNINTERESTING ) {
308
- mark_tree_uninteresting (tree );
315
+ mark_tree_contents_uninteresting (tree );
309
316
return NULL ;
310
317
}
311
318
add_pending_object (revs , object , "" );
@@ -316,13 +323,10 @@ static struct commit *handle_commit(struct rev_info *revs,
316
323
* Blob object? You know the drill by now..
317
324
*/
318
325
if (object -> type == OBJ_BLOB ) {
319
- struct blob * blob = (struct blob * )object ;
320
326
if (!revs -> blob_objects )
321
327
return NULL ;
322
- if (flags & UNINTERESTING ) {
323
- mark_blob_uninteresting (blob );
328
+ if (flags & UNINTERESTING )
324
329
return NULL ;
325
- }
326
330
add_pending_object (revs , object , "" );
327
331
return NULL ;
328
332
}
0 commit comments