@@ -52,6 +52,11 @@ static void show_commit(struct commit *commit, void *data)
52
52
struct rev_list_info * info = data ;
53
53
struct rev_info * revs = info -> revs ;
54
54
55
+ if (info -> flags & REV_LIST_QUIET ) {
56
+ finish_commit (commit , data );
57
+ return ;
58
+ }
59
+
55
60
graph_show_commit (revs -> graph );
56
61
57
62
if (revs -> count ) {
@@ -172,19 +177,21 @@ static void finish_object(struct object *obj,
172
177
const struct name_path * path , const char * name ,
173
178
void * cb_data )
174
179
{
180
+ struct rev_list_info * info = cb_data ;
175
181
if (obj -> type == OBJ_BLOB && !has_sha1_file (obj -> sha1 ))
176
182
die ("missing blob object '%s'" , sha1_to_hex (obj -> sha1 ));
183
+ if (info -> revs -> verify_objects && !obj -> parsed && obj -> type != OBJ_COMMIT )
184
+ parse_object (obj -> sha1 );
177
185
}
178
186
179
187
static void show_object (struct object * obj ,
180
188
const struct name_path * path , const char * component ,
181
189
void * cb_data )
182
190
{
183
191
struct rev_list_info * info = cb_data ;
184
-
185
192
finish_object (obj , path , component , cb_data );
186
- if (info -> revs -> verify_objects && ! obj -> parsed && obj -> type != OBJ_COMMIT )
187
- parse_object ( obj -> sha1 ) ;
193
+ if (info -> flags & REV_LIST_QUIET )
194
+ return ;
188
195
show_object_with_name (stdout , obj , path , component );
189
196
}
190
197
@@ -242,13 +249,6 @@ void print_commit_list(struct commit_list *list,
242
249
}
243
250
}
244
251
245
- static void show_tried_revs (struct commit_list * tried )
246
- {
247
- printf ("bisect_tried='" );
248
- print_commit_list (tried , "%s|" , "%s" );
249
- printf ("'\n" );
250
- }
251
-
252
252
static void print_var_str (const char * var , const char * val )
253
253
{
254
254
printf ("%s='%s'\n" , var , val );
@@ -261,12 +261,12 @@ static void print_var_int(const char *var, int val)
261
261
262
262
static int show_bisect_vars (struct rev_list_info * info , int reaches , int all )
263
263
{
264
- int cnt , flags = info -> bisect_show_flags ;
264
+ int cnt , flags = info -> flags ;
265
265
char hex [41 ] = "" ;
266
266
struct commit_list * tried ;
267
267
struct rev_info * revs = info -> revs ;
268
268
269
- if (!revs -> commits && !( flags & BISECT_SHOW_TRIED ) )
269
+ if (!revs -> commits )
270
270
return 1 ;
271
271
272
272
revs -> commits = filter_skipped (revs -> commits , & tried ,
@@ -294,9 +294,6 @@ static int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
294
294
printf ("------\n" );
295
295
}
296
296
297
- if (flags & BISECT_SHOW_TRIED )
298
- show_tried_revs (tried );
299
-
300
297
print_var_str ("bisect_rev" , hex );
301
298
print_var_int ("bisect_nr" , cnt - 1 );
302
299
print_var_int ("bisect_good" , all - reaches - 1 );
@@ -315,7 +312,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
315
312
int bisect_list = 0 ;
316
313
int bisect_show_vars = 0 ;
317
314
int bisect_find_all = 0 ;
318
- int quiet = 0 ;
319
315
320
316
git_config (git_default_config , NULL );
321
317
init_revisions (& revs , prefix );
@@ -328,7 +324,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
328
324
if (revs .bisect )
329
325
bisect_list = 1 ;
330
326
331
- quiet = DIFF_OPT_TST (& revs .diffopt , QUICK );
327
+ if (DIFF_OPT_TST (& revs .diffopt , QUICK ))
328
+ info .flags |= REV_LIST_QUIET ;
332
329
for (i = 1 ; i < argc ; i ++ ) {
333
330
const char * arg = argv [i ];
334
331
@@ -347,7 +344,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
347
344
if (!strcmp (arg , "--bisect-all" )) {
348
345
bisect_list = 1 ;
349
346
bisect_find_all = 1 ;
350
- info .bisect_show_flags = BISECT_SHOW_ALL ;
347
+ info .flags | = BISECT_SHOW_ALL ;
351
348
revs .show_decorations = 1 ;
352
349
continue ;
353
350
}
@@ -398,10 +395,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
398
395
return show_bisect_vars (& info , reaches , all );
399
396
}
400
397
401
- traverse_commit_list (& revs ,
402
- quiet ? finish_commit : show_commit ,
403
- quiet ? finish_object : show_object ,
404
- & info );
398
+ traverse_commit_list (& revs , show_commit , show_object , & info );
405
399
406
400
if (revs .count ) {
407
401
if (revs .left_right && revs .cherry_mark )
0 commit comments