@@ -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
@@ -254,7 +261,7 @@ static void print_var_int(const char *var, int val)
254
261
255
262
static int show_bisect_vars (struct rev_list_info * info , int reaches , int all )
256
263
{
257
- int cnt , flags = info -> bisect_show_flags ;
264
+ int cnt , flags = info -> flags ;
258
265
char hex [41 ] = "" ;
259
266
struct commit_list * tried ;
260
267
struct rev_info * revs = info -> revs ;
@@ -305,7 +312,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
305
312
int bisect_list = 0 ;
306
313
int bisect_show_vars = 0 ;
307
314
int bisect_find_all = 0 ;
308
- int quiet = 0 ;
309
315
310
316
git_config (git_default_config , NULL );
311
317
init_revisions (& revs , prefix );
@@ -318,7 +324,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
318
324
if (revs .bisect )
319
325
bisect_list = 1 ;
320
326
321
- quiet = DIFF_OPT_TST (& revs .diffopt , QUICK );
327
+ if (DIFF_OPT_TST (& revs .diffopt , QUICK ))
328
+ info .flags |= REV_LIST_QUIET ;
322
329
for (i = 1 ; i < argc ; i ++ ) {
323
330
const char * arg = argv [i ];
324
331
@@ -337,7 +344,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
337
344
if (!strcmp (arg , "--bisect-all" )) {
338
345
bisect_list = 1 ;
339
346
bisect_find_all = 1 ;
340
- info .bisect_show_flags = BISECT_SHOW_ALL ;
347
+ info .flags | = BISECT_SHOW_ALL ;
341
348
revs .show_decorations = 1 ;
342
349
continue ;
343
350
}
@@ -388,10 +395,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
388
395
return show_bisect_vars (& info , reaches , all );
389
396
}
390
397
391
- traverse_commit_list (& revs ,
392
- quiet ? finish_commit : show_commit ,
393
- quiet ? finish_object : show_object ,
394
- & info );
398
+ traverse_commit_list (& revs , show_commit , show_object , & info );
395
399
396
400
if (revs .count ) {
397
401
if (revs .left_right && revs .cherry_mark )
0 commit comments