9
#include "log-tree.h"
10
#include "graph.h"
11
#include "bisect.h"
12
+#include "progress.h"
13
14
static const char rev_list_usage[] =
15
"git rev-list [OPTION] <commit-id>... [ -- paths... ]\n"
50
" --bisect-all"
51
;
52
53
+static struct progress *progress;
54
+static unsigned progress_counter;
55
+
56
static void finish_commit(struct commit *commit, void *data);
57
static void show_commit(struct commit *commit, void *data)
58
{
59
struct rev_list_info *info = data;
60
struct rev_info *revs = info->revs;
61
62
+ display_progress(progress, ++progress_counter);
63
+
64
if (info->flags & REV_LIST_QUIET) {
65
finish_commit(commit, data);
66
return;
196
{
197
struct rev_list_info *info = cb_data;
198
finish_object(obj, name, cb_data);
199
+ display_progress(progress, ++progress_counter);
200
if (info->flags & REV_LIST_QUIET)
201
return;
202
show_object_with_name(stdout, obj, name);
283
int bisect_show_vars = 0;
284
int bisect_find_all = 0;
285
int use_bitmap_index = 0;
286
+ const char *show_progress = NULL;
287
288
git_config(git_default_config, NULL);
289
init_revisions(&revs, prefix);
333
test_bitmap_walk(&revs);
334
return 0;
335
}
336
+ if (skip_prefix(arg, "--progress=", &arg)) {
337
+ show_progress = arg;
338
+ continue;
339
+ }
340
usage(rev_list_usage);
341
342
}
367
if (bisect_list)
368
revs.limited = 1;
369
370
+ if (show_progress)
371
+ progress = start_progress_delay(show_progress, 0, 0, 2);
372
+
373
if (use_bitmap_index && !revs.prune) {
374
if (revs.count && !revs.left_right && !revs.cherry_mark) {
375
uint32_t commit_count;
407
408
traverse_commit_list(&revs, show_commit, show_object, &info);
409
410
+ stop_progress(&progress);
411
+
412
if (revs.count) {
413
if (revs.left_right && revs.cherry_mark)
414
printf("%d\t%d\t%d\n", revs.count_left, revs.count_right, revs.count_same);