revs 608 bisect.c static void bisect_rev_setup(struct rev_info *revs, const char *prefix, revs 615 bisect.c init_revisions(revs, prefix); revs 616 bisect.c revs->abbrev = 0; revs 617 bisect.c revs->commit_format = CMIT_FMT_UNSPECIFIED; revs 629 bisect.c setup_revisions(rev_argv.argc, rev_argv.argv, revs, NULL); revs 633 bisect.c static void bisect_common(struct rev_info *revs) revs 635 bisect.c if (prepare_revision_walk(revs)) revs 637 bisect.c if (revs->tree_objects) revs 638 bisect.c mark_edges_uninteresting(revs, NULL); revs 801 bisect.c struct rev_info revs; revs 805 bisect.c bisect_rev_setup(&revs, prefix, "^%s", "%s", 0); revs 808 bisect.c pending_copy = revs.pending; revs 809 bisect.c revs.leak_pending = 1; revs 816 bisect.c bisect_common(&revs); revs 817 bisect.c res = (revs.commits != NULL); revs 931 bisect.c struct rev_info revs; revs 942 bisect.c bisect_rev_setup(&revs, prefix, "%s", "^%s", 1); revs 943 bisect.c revs.limited = 1; revs 945 bisect.c bisect_common(&revs); revs 947 bisect.c revs.commits = find_bisection(revs.commits, &reaches, &all, revs 949 bisect.c revs.commits = managed_skipped(revs.commits, &tried); revs 951 bisect.c if (!revs.commits) { revs 971 bisect.c bisect_rev = revs.commits->item->object.sha1; revs 977 bisect.c show_diff_tree(prefix, revs.commits->item); revs 18 bisect.h struct rev_info *revs; revs 383 builtin/blame.c struct rev_info *revs; revs 973 builtin/blame.c fill_origin_blob(&sb->revs->diffopt, parent, &file_p); revs 974 builtin/blame.c fill_origin_blob(&sb->revs->diffopt, target, &file_o); revs 1179 builtin/blame.c fill_origin_blob(&sb->revs->diffopt, parent, &file_p); revs 1308 builtin/blame.c fill_origin_blob(&sb->revs->diffopt, norigin, &file_p); revs 1372 builtin/blame.c static struct commit_list *first_scapegoat(struct rev_info *revs, struct commit *commit) revs 1375 builtin/blame.c if (revs->first_parent_only && revs 1383 builtin/blame.c return lookup_decoration(&revs->children, &commit->object); revs 1386 builtin/blame.c static int num_scapegoats(struct rev_info *revs, struct commit *commit) revs 1388 builtin/blame.c struct commit_list *l = first_scapegoat(revs, commit); revs 1417 builtin/blame.c struct rev_info *revs = sb->revs; revs 1426 builtin/blame.c num_sg = num_scapegoats(revs, commit); revs 1443 builtin/blame.c for (i = 0, sg = first_scapegoat(revs, commit); revs 1476 builtin/blame.c for (i = 0, sg = first_scapegoat(revs, commit); revs 1497 builtin/blame.c for (i = 0, sg = first_scapegoat(revs, commit); revs 1524 builtin/blame.c for (i = 0, sg = first_scapegoat(revs, commit); revs 1768 builtin/blame.c struct rev_info *revs = sb->revs; revs 1794 builtin/blame.c !(revs->max_age != -1 && commit->date < revs->max_age))) revs 2408 builtin/blame.c struct rev_info *revs = sb->revs; revs 2414 builtin/blame.c for (i = 0; i < revs->pending.nr; i++) { revs 2415 builtin/blame.c struct object *obj = revs->pending.objects[i].item; revs 2421 builtin/blame.c die("Non commit %s?", revs->pending.objects[i].name); revs 2424 builtin/blame.c revs->pending.objects[i].name, revs 2427 builtin/blame.c final_commit_name = revs->pending.objects[i].name; revs 2436 builtin/blame.c struct rev_info *revs = sb->revs; revs 2442 builtin/blame.c for (i = 0; i < revs->pending.nr; i++) { revs 2443 builtin/blame.c struct object *obj = revs->pending.objects[i].item; revs 2449 builtin/blame.c die("Non commit %s?", revs->pending.objects[i].name); revs 2452 builtin/blame.c revs->pending.objects[i].name, revs 2455 builtin/blame.c final_commit_name = revs->pending.objects[i].name; revs 2497 builtin/blame.c struct rev_info revs; revs 2544 builtin/blame.c init_revisions(&revs, NULL); revs 2545 builtin/blame.c revs.date_mode = blame_date_mode; revs 2546 builtin/blame.c DIFF_OPT_SET(&revs.diffopt, ALLOW_TEXTCONV); revs 2547 builtin/blame.c DIFF_OPT_SET(&revs.diffopt, FOLLOW_RENAMES); revs 2568 builtin/blame.c parse_revision_opt(&revs, &ctx, options, blame_opt_usage); revs 2571 builtin/blame.c no_whole_file_rename = !DIFF_OPT_TST(&revs.diffopt, FOLLOW_RENAMES); revs 2572 builtin/blame.c DIFF_OPT_CLR(&revs.diffopt, FOLLOW_RENAMES); revs 2586 builtin/blame.c blame_date_mode = revs.date_mode; revs 2625 builtin/blame.c if (DIFF_OPT_TST(&revs.diffopt, FIND_COPIES_HARDER)) revs 2684 builtin/blame.c revs.disable_stdin = 1; revs 2685 builtin/blame.c setup_revisions(argc, argv, &revs, NULL); revs 2688 builtin/blame.c sb.revs = &revs; revs 2695 builtin/blame.c else if (revs.first_parent_only) revs 2709 builtin/blame.c sb.final = fake_working_tree_commit(&sb.revs->diffopt, revs 2711 builtin/blame.c add_pending_object(&revs, &(sb.final->object), ":"); revs 2721 builtin/blame.c if (prepare_revision_walk(&revs)) revs 2734 builtin/blame.c if (DIFF_OPT_TST(&sb.revs->diffopt, ALLOW_TEXTCONV) && revs 291 builtin/branch.c struct rev_info revs; revs 378 builtin/branch.c add_pending_object(&ref_list->revs, revs 634 builtin/branch.c init_revisions(&ref_list.revs, NULL); revs 647 builtin/branch.c add_pending_object(&ref_list.revs, revs 649 builtin/branch.c ref_list.revs.limited = 1; revs 651 builtin/branch.c if (prepare_revision_walk(&ref_list.revs)) revs 714 builtin/checkout.c static void suggest_reattach(struct commit *commit, struct rev_info *revs) revs 719 builtin/checkout.c while ((c = get_revision(revs)) != NULL) { revs 774 builtin/checkout.c struct rev_info revs; revs 778 builtin/checkout.c init_revisions(&revs, NULL); revs 779 builtin/checkout.c setup_revisions(0, NULL, &revs, NULL); revs 782 builtin/checkout.c add_pending_object(&revs, object, sha1_to_hex(object->sha1)); revs 784 builtin/checkout.c for_each_ref(add_pending_uninteresting_ref, &revs); revs 785 builtin/checkout.c add_pending_sha1(&revs, "HEAD", new->object.sha1, UNINTERESTING); revs 787 builtin/checkout.c refs = revs.pending; revs 788 builtin/checkout.c revs.leak_pending = 1; revs 790 builtin/checkout.c if (prepare_revision_walk(&revs)) revs 793 builtin/checkout.c suggest_reattach(old, &revs); revs 1026 builtin/commit.c struct rev_info revs; revs 1033 builtin/commit.c init_revisions(&revs, NULL); revs 1039 builtin/commit.c setup_revisions(ac, av, &revs, NULL); revs 1040 builtin/commit.c revs.mailmap = &mailmap; revs 1041 builtin/commit.c read_mailmap(revs.mailmap, NULL); revs 1043 builtin/commit.c if (prepare_revision_walk(&revs)) revs 1045 builtin/commit.c commit = get_revision(&revs); revs 69 builtin/diff.c static int builtin_diff_b_f(struct rev_info *revs, revs 80 builtin/diff.c GUARD_PATHSPEC(&revs->prune_data, PATHSPEC_FROMTOP | PATHSPEC_LITERAL); revs 81 builtin/diff.c path = revs->prune_data.items[0].match; revs 88 builtin/diff.c diff_set_mnemonic_prefix(&revs->diffopt, "o/", "w/"); revs 93 builtin/diff.c stuff_change(&revs->diffopt, revs 98 builtin/diff.c diffcore_std(&revs->diffopt); revs 99 builtin/diff.c diff_flush(&revs->diffopt); revs 103 builtin/diff.c static int builtin_diff_blobs(struct rev_info *revs, revs 118 builtin/diff.c stuff_change(&revs->diffopt, revs 123 builtin/diff.c diffcore_std(&revs->diffopt); revs 124 builtin/diff.c diff_flush(&revs->diffopt); revs 128 builtin/diff.c static int builtin_diff_index(struct rev_info *revs, revs 144 builtin/diff.c if (revs->pending.nr != 1 || revs 145 builtin/diff.c revs->max_count != -1 || revs->min_age != -1 || revs 146 builtin/diff.c revs->max_age != -1) revs 150 builtin/diff.c if (read_cache_preload(&revs->diffopt.pathspec) < 0) { revs 158 builtin/diff.c return run_diff_index(revs, cached); revs 161 builtin/diff.c static int builtin_diff_tree(struct rev_info *revs, revs 180 builtin/diff.c diff_tree_sha1(sha1[0], sha1[1], "", &revs->diffopt); revs 181 builtin/diff.c log_tree_diff_flush(revs); revs 185 builtin/diff.c static int builtin_diff_combined(struct rev_info *revs, revs 196 builtin/diff.c if (!revs->dense_combined_merges && !revs->combine_merges) revs 197 builtin/diff.c revs->dense_combined_merges = revs->combine_merges = 1; revs 201 builtin/diff.c revs->dense_combined_merges, revs); revs 221 builtin/diff.c static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv) revs 227 builtin/diff.c revs->max_count = 1; revs 229 builtin/diff.c revs->max_count = 2; revs 231 builtin/diff.c revs->max_count = 3; revs 247 builtin/diff.c if (revs->max_count == -1 && !revs->combine_merges && revs 248 builtin/diff.c (revs->diffopt.output_format & DIFF_FORMAT_PATCH)) revs 249 builtin/diff.c revs->combine_merges = revs->dense_combined_merges = 1; revs 252 builtin/diff.c if (read_cache_preload(&revs->diffopt.pathspec) < 0) { revs 256 builtin/diff.c return run_diff_files(revs, options); revs 631 builtin/fast-export.c static void handle_tail(struct object_array *commits, struct rev_info *revs) revs 638 builtin/fast-export.c handle_commit(commit, revs); revs 972 builtin/fast-export.c struct rev_info revs; revs 1010 builtin/fast-export.c init_revisions(&revs, prefix); revs 1011 builtin/fast-export.c revs.topo_order = 1; revs 1012 builtin/fast-export.c revs.show_source = 1; revs 1013 builtin/fast-export.c revs.rewrite_parents = 1; revs 1016 builtin/fast-export.c argc = setup_revisions(argc, argv, &revs, NULL); revs 1042 builtin/fast-export.c if (import_filename && revs.prune_data.nr) revs 1045 builtin/fast-export.c get_tags_and_duplicates(&revs.cmdline); revs 1047 builtin/fast-export.c if (prepare_revision_walk(&revs)) revs 1049 builtin/fast-export.c revs.diffopt.format_callback = show_filemodify; revs 1050 builtin/fast-export.c DIFF_OPT_SET(&revs.diffopt, RECURSIVE); revs 1051 builtin/fast-export.c while ((commit = get_revision(&revs))) { revs 1056 builtin/fast-export.c handle_commit(commit, &revs); revs 1057 builtin/fast-export.c handle_tail(&commits, &revs); revs 238 builtin/log.c static void log_show_early(struct rev_info *revs, struct commit_list *list) revs 240 builtin/log.c int i = revs->early_output; revs 243 builtin/log.c sort_in_topological_order(&list, revs->sort_order); revs 246 builtin/log.c switch (simplify_commit(revs, commit)) { revs 249 builtin/log.c int n = estimate_commit_count(revs, list); revs 250 builtin/log.c show_early_header(revs, "incomplete", n); revs 253 builtin/log.c log_tree_commit(revs, commit); revs 1592 builtin/log.c static int add_pending_commit(const char *arg, struct rev_info *revs, int flags) revs 1599 builtin/log.c add_pending_object(revs, &commit->object, arg); revs 1629 builtin/log.c struct rev_info revs; revs 1668 builtin/log.c init_revisions(&revs, prefix); revs 1669 builtin/log.c revs.max_parents = 1; revs 1671 builtin/log.c if (add_pending_commit(head, &revs, 0)) revs 1673 builtin/log.c if (add_pending_commit(upstream, &revs, UNINTERESTING)) revs 1677 builtin/log.c if (revs.pending.nr == 2) { revs 1678 builtin/log.c struct object_array_entry *o = revs.pending.objects; revs 1683 builtin/log.c get_patch_ids(&revs, &ids); revs 1685 builtin/log.c if (limit && add_pending_commit(limit, &revs, UNINTERESTING)) revs 1689 builtin/log.c if (prepare_revision_walk(&revs)) revs 1691 builtin/log.c while ((commit = get_revision(&revs)) != NULL) { revs 53 builtin/merge-base.c struct commit_list *revs = NULL; revs 58 builtin/merge-base.c commit_list_insert(get_commit_reference(args[i]), &revs); revs 60 builtin/merge-base.c result = reduce_heads(revs); revs 73 builtin/merge-base.c struct commit_list *revs = NULL; revs 78 builtin/merge-base.c commit_list_insert(get_commit_reference(args[i]), &revs); revs 80 builtin/merge-base.c result = reduce_heads(get_octopus_merge_bases(revs)); revs 116 builtin/merge-base.c static void add_one_commit(unsigned char *sha1, struct rev_collect *revs) revs 129 builtin/merge-base.c ALLOC_GROW(revs->commit, revs->nr + 1, revs->alloc); revs 130 builtin/merge-base.c revs->commit[revs->nr++] = commit; revs 138 builtin/merge-base.c struct rev_collect *revs = cbdata; revs 140 builtin/merge-base.c if (revs->initial) { revs 141 builtin/merge-base.c revs->initial = 0; revs 142 builtin/merge-base.c add_one_commit(osha1, revs); revs 144 builtin/merge-base.c add_one_commit(nsha1, revs); revs 153 builtin/merge-base.c struct rev_collect revs; revs 172 builtin/merge-base.c memset(&revs, 0, sizeof(revs)); revs 173 builtin/merge-base.c revs.initial = 1; revs 174 builtin/merge-base.c for_each_reflog_ent(refname, collect_one_reflog_ent, &revs); revs 176 builtin/merge-base.c for (i = 0; i < revs.nr; i++) revs 177 builtin/merge-base.c revs.commit[i]->object.flags &= ~TMP_MARK; revs 179 builtin/merge-base.c bases = get_merge_bases_many_dirty(derived, revs.nr, revs.commit); revs 191 builtin/merge-base.c for (i = 0; i < revs.nr; i++) revs 192 builtin/merge-base.c if (&bases->item->object == &revs.commit[i]->object) revs 194 builtin/merge-base.c if (revs.nr <= i) { revs 305 builtin/name-rev.c struct object_array revs = OBJECT_ARRAY_INIT; revs 375 builtin/name-rev.c add_object_array(object, *argv, &revs); revs 404 builtin/name-rev.c for (i = 0; i < revs.nr; i++) revs 405 builtin/name-rev.c show_name(revs.objects[i].item, revs.objects[i].name, revs 2344 builtin/pack-objects.c static void add_objects_in_unpacked_packs(struct rev_info *revs) revs 2429 builtin/pack-objects.c static void loosen_unused_packed_objects(struct rev_info *revs) revs 2463 builtin/pack-objects.c static int get_object_list_from_bitmap(struct rev_info *revs) revs 2465 builtin/pack-objects.c if (prepare_bitmap_walk(revs) < 0) revs 2497 builtin/pack-objects.c struct rev_info revs; revs 2501 builtin/pack-objects.c init_revisions(&revs, NULL); revs 2503 builtin/pack-objects.c setup_revisions(ac, av, &revs, NULL); revs 2530 builtin/pack-objects.c if (handle_revision_arg(line, &revs, flags, REVARG_CANNOT_BE_FILENAME)) revs 2534 builtin/pack-objects.c if (use_bitmap_index && !get_object_list_from_bitmap(&revs)) revs 2537 builtin/pack-objects.c if (prepare_revision_walk(&revs)) revs 2539 builtin/pack-objects.c mark_edges_uninteresting(&revs, show_edge); revs 2540 builtin/pack-objects.c traverse_commit_list(&revs, show_commit, show_object, NULL); revs 2543 builtin/pack-objects.c revs.ignore_missing_links = 1; revs 2544 builtin/pack-objects.c if (add_unseen_recent_objects_to_traversal(&revs, revs 2547 builtin/pack-objects.c if (prepare_revision_walk(&revs)) revs 2549 builtin/pack-objects.c traverse_commit_list(&revs, record_recent_commit, revs 2554 builtin/pack-objects.c add_objects_in_unpacked_packs(&revs); revs 2556 builtin/pack-objects.c loosen_unused_packed_objects(&revs); revs 102 builtin/prune.c struct rev_info revs; revs 118 builtin/prune.c init_revisions(&revs, prefix); revs 131 builtin/prune.c add_pending_object(&revs, object, ""); revs 142 builtin/prune.c mark_reachable_objects(&revs, 1, expire, progress); revs 734 builtin/pull.c struct commit_list *revs = NULL, *result; revs 736 builtin/pull.c commit_list_insert(lookup_commit_reference(curr_head), &revs); revs 737 builtin/pull.c commit_list_insert(lookup_commit_reference(merge_head), &revs); revs 739 builtin/pull.c commit_list_insert(lookup_commit_reference(fork_point), &revs); revs 741 builtin/pull.c result = reduce_heads(get_octopus_merge_bases(revs)); revs 742 builtin/pull.c free_commit_list(revs); revs 23 builtin/reflog.c struct rev_info revs; revs 583 builtin/reflog.c init_revisions(&cb.cmd.revs, prefix); revs 586 builtin/reflog.c mark_reachable_objects(&cb.cmd.revs, 0, 0, NULL); revs 56 builtin/rev-list.c struct rev_info *revs = info->revs; revs 63 builtin/rev-list.c graph_show_commit(revs->graph); revs 65 builtin/rev-list.c if (revs->count) { revs 67 builtin/rev-list.c revs->count_same++; revs 69 builtin/rev-list.c revs->count_left++; revs 71 builtin/rev-list.c revs->count_right++; revs 81 builtin/rev-list.c if (!revs->graph) revs 82 builtin/rev-list.c fputs(get_revision_mark(revs, commit), stdout); revs 83 builtin/rev-list.c if (revs->abbrev_commit && revs->abbrev) revs 84 builtin/rev-list.c fputs(find_unique_abbrev(commit->object.sha1, revs->abbrev), revs 88 builtin/rev-list.c if (revs->print_parents) { revs 95 builtin/rev-list.c if (revs->children.name) { revs 98 builtin/rev-list.c children = lookup_decoration(&revs->children, &commit->object); revs 104 builtin/rev-list.c show_decorations(revs, commit); revs 105 builtin/rev-list.c if (revs->commit_format == CMIT_FMT_ONELINE) revs 110 builtin/rev-list.c if (revs->verbose_header && get_cached_commit_buffer(commit, NULL)) { revs 113 builtin/rev-list.c ctx.abbrev = revs->abbrev; revs 114 builtin/rev-list.c ctx.date_mode = revs->date_mode; revs 115 builtin/rev-list.c ctx.date_mode_explicit = revs->date_mode_explicit; revs 116 builtin/rev-list.c ctx.fmt = revs->commit_format; revs 119 builtin/rev-list.c if (revs->graph) { revs 121 builtin/rev-list.c if (revs->commit_format != CMIT_FMT_ONELINE) revs 122 builtin/rev-list.c graph_show_oneline(revs->graph); revs 124 builtin/rev-list.c graph_show_commit_msg(revs->graph, &buf); revs 142 builtin/rev-list.c graph_show_padding(revs->graph); revs 150 builtin/rev-list.c if (graph_show_remainder(revs->graph)) revs 152 builtin/rev-list.c if (revs->commit_format == CMIT_FMT_ONELINE) revs 156 builtin/rev-list.c if (revs->commit_format != CMIT_FMT_USERFORMAT || revs 164 builtin/rev-list.c if (graph_show_remainder(revs->graph)) revs 187 builtin/rev-list.c if (info->revs->verify_objects && !obj->parsed && obj->type != OBJ_COMMIT) revs 222 builtin/rev-list.c struct rev_info *revs = info->revs; revs 224 builtin/rev-list.c if (!revs->commits) revs 227 builtin/rev-list.c revs->commits = filter_skipped(revs->commits, &tried, revs 244 builtin/rev-list.c if (revs->commits) revs 245 builtin/rev-list.c strcpy(hex, sha1_to_hex(revs->commits->item->object.sha1)); revs 248 builtin/rev-list.c traverse_commit_list(revs, show_commit, show_object, info); revs 276 builtin/rev-list.c struct rev_info revs; revs 285 builtin/rev-list.c init_revisions(&revs, prefix); revs 286 builtin/rev-list.c revs.abbrev = DEFAULT_ABBREV; revs 287 builtin/rev-list.c revs.commit_format = CMIT_FMT_UNSPECIFIED; revs 288 builtin/rev-list.c argc = setup_revisions(argc, argv, &revs, NULL); revs 291 builtin/rev-list.c info.revs = &revs; revs 292 builtin/rev-list.c if (revs.bisect) revs 295 builtin/rev-list.c if (DIFF_OPT_TST(&revs.diffopt, QUICK)) revs 301 builtin/rev-list.c revs.verbose_header = 1; revs 316 builtin/rev-list.c revs.show_decorations = 1; revs 329 builtin/rev-list.c test_bitmap_walk(&revs); revs 335 builtin/rev-list.c if (revs.commit_format != CMIT_FMT_UNSPECIFIED) { revs 338 builtin/rev-list.c if (revs.commit_format == CMIT_FMT_ONELINE) revs 343 builtin/rev-list.c else if (revs.verbose_header) revs 345 builtin/rev-list.c revs.commit_format = CMIT_FMT_RAW; revs 347 builtin/rev-list.c if ((!revs.commits && revs 348 builtin/rev-list.c (!(revs.tag_objects || revs.tree_objects || revs.blob_objects) && revs 349 builtin/rev-list.c !revs.pending.nr)) || revs 350 builtin/rev-list.c revs.diff) revs 353 builtin/rev-list.c if (revs.show_notes) revs 356 builtin/rev-list.c save_commit_buffer = (revs.verbose_header || revs 357 builtin/rev-list.c revs.grep_filter.pattern_list || revs 358 builtin/rev-list.c revs.grep_filter.header_list); revs 360 builtin/rev-list.c revs.limited = 1; revs 362 builtin/rev-list.c if (use_bitmap_index && !revs.prune) { revs 363 builtin/rev-list.c if (revs.count && !revs.left_right && !revs.cherry_mark) { revs 365 builtin/rev-list.c if (!prepare_bitmap_walk(&revs)) { revs 370 builtin/rev-list.c } else if (revs.tag_objects && revs.tree_objects && revs.blob_objects) { revs 371 builtin/rev-list.c if (!prepare_bitmap_walk(&revs)) { revs 378 builtin/rev-list.c if (prepare_revision_walk(&revs)) revs 380 builtin/rev-list.c if (revs.tree_objects) revs 381 builtin/rev-list.c mark_edges_uninteresting(&revs, show_edge); revs 386 builtin/rev-list.c revs.commits = find_bisection(revs.commits, &reaches, &all, revs 393 builtin/rev-list.c traverse_commit_list(&revs, show_commit, show_object, &info); revs 395 builtin/rev-list.c if (revs.count) { revs 396 builtin/rev-list.c if (revs.left_right && revs.cherry_mark) revs 397 builtin/rev-list.c printf("%d\t%d\t%d\n", revs.count_left, revs.count_right, revs.count_same); revs 398 builtin/rev-list.c else if (revs.left_right) revs 399 builtin/rev-list.c printf("%d\t%d\n", revs.count_left, revs.count_right); revs 400 builtin/rev-list.c else if (revs.cherry_mark) revs 401 builtin/rev-list.c printf("%d\t%d\n", revs.count_left + revs.count_right, revs.count_same); revs 403 builtin/rev-list.c printf("%d\n", revs.count_left + revs.count_right); revs 165 builtin/revert.c opts->revs = NULL; revs 168 builtin/revert.c opts->revs = xmalloc(sizeof(*opts->revs)); revs 169 builtin/revert.c init_revisions(opts->revs, NULL); revs 170 builtin/revert.c opts->revs->no_walk = REVISION_WALK_NO_WALK_UNSORTED; revs 177 builtin/revert.c argc = setup_revisions(argc, argv, opts->revs, &s_r_opt); revs 134 bundle.c struct rev_info revs; revs 141 bundle.c init_revisions(&revs, NULL); revs 147 bundle.c add_pending_object(&revs, o, e->name); revs 154 bundle.c if (revs.pending.nr != p->nr) revs 156 bundle.c req_nr = revs.pending.nr; revs 157 bundle.c setup_revisions(2, argv, &revs, NULL); revs 159 bundle.c refs = revs.pending; revs 160 bundle.c revs.leak_pending = 1; revs 162 bundle.c if (prepare_revision_walk(&revs)) revs 166 bundle.c while (i && (commit = get_revision(&revs))) revs 209 bundle.c static int is_tag_in_date_range(struct object *tag, struct rev_info *revs) revs 217 bundle.c if (revs->max_age == -1 && revs->min_age == -1) revs 231 bundle.c result = (revs->max_age == -1 || revs->max_age < date) && revs 232 bundle.c (revs->min_age == -1 || revs->min_age > date); revs 240 bundle.c static int write_pack_data(int bundle_fd, struct rev_info *revs) revs 255 bundle.c for (i = 0; i < revs->pending.nr; i++) { revs 256 bundle.c struct object *object = revs->pending.objects[i].item; revs 269 bundle.c struct rev_info *revs, revs 294 bundle.c add_pending_object(revs, object, buf.buf); revs 317 bundle.c static int write_bundle_refs(int bundle_fd, struct rev_info *revs) revs 322 bundle.c for (i = 0; i < revs->pending.nr; i++) { revs 323 bundle.c struct object_array_entry *e = revs->pending.objects + i; revs 338 bundle.c !is_tag_in_date_range(e->item, revs)) { revs 383 bundle.c add_pending_object(revs, obj, e->name); revs 409 bundle.c struct rev_info revs; revs 434 bundle.c init_revisions(&revs, NULL); revs 437 bundle.c if (compute_and_write_prerequisites(bundle_fd, &revs, argc, argv)) revs 440 bundle.c argc = setup_revisions(argc, argv, &revs, NULL); revs 445 bundle.c object_array_remove_duplicates(&revs.pending); revs 447 bundle.c ref_count = write_bundle_refs(bundle_fd, &revs); revs 454 bundle.c if (write_pack_data(bundle_fd, &revs)) revs 87 diff-lib.c int run_diff_files(struct rev_info *revs, unsigned int option) revs 90 diff-lib.c int diff_unmerged_stage = revs->max_count; revs 94 diff-lib.c diff_set_mnemonic_prefix(&revs->diffopt, "i/", "w/"); revs 106 diff-lib.c if (diff_can_quit_early(&revs->diffopt)) revs 109 diff-lib.c if (!ce_path_match(ce, &revs->prune_data, NULL)) revs 174 diff-lib.c if (revs->combine_merges && num_compare_stages == 2) { revs 176 diff-lib.c revs->dense_combined_merges, revs 177 diff-lib.c revs); revs 188 diff-lib.c pair = diff_unmerge(&revs->diffopt, ce->name); revs 211 diff-lib.c diff_addremove(&revs->diffopt, '-', ce->ce_mode, revs 217 diff-lib.c changed = match_stat_with_submodule(&revs->diffopt, ce, &st, revs 224 diff-lib.c if (!DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER)) revs 230 diff-lib.c diff_change(&revs->diffopt, oldmode, newmode, revs 237 diff-lib.c diffcore_std(&revs->diffopt); revs 238 diff-lib.c diff_flush(&revs->diffopt); revs 247 diff-lib.c static void diff_index_show_file(struct rev_info *revs, revs 254 diff-lib.c diff_addremove(&revs->diffopt, prefix[0], mode, revs 294 diff-lib.c static void show_new_file(struct rev_info *revs, revs 307 diff-lib.c &dirty_submodule, &revs->diffopt) < 0) revs 310 diff-lib.c diff_index_show_file(revs, "+", new, sha1, !is_null_sha1(sha1), mode, dirty_submodule); revs 313 diff-lib.c static int show_modified(struct rev_info *revs, revs 324 diff-lib.c &dirty_submodule, &revs->diffopt) < 0) { revs 326 diff-lib.c diff_index_show_file(revs, "-", old, revs 331 diff-lib.c if (revs->combine_merges && !cached && revs 350 diff-lib.c show_combined_diff(p, 2, revs->dense_combined_merges, revs); revs 357 diff-lib.c !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER)) revs 360 diff-lib.c diff_change(&revs->diffopt, oldmode, mode, revs 376 diff-lib.c struct rev_info *revs = o->unpack_data; revs 389 diff-lib.c match_missing = !revs->ignore_merges; revs 393 diff-lib.c pair = diff_unmerge(&revs->diffopt, idx->name); revs 403 diff-lib.c show_new_file(revs, idx, cached, match_missing); revs 411 diff-lib.c diff_index_show_file(revs, "-", tree, tree->sha1, 1, tree->ce_mode, 0); revs 416 diff-lib.c show_modified(revs, tree, idx, 1, cached, match_missing); revs 439 diff-lib.c struct rev_info *revs = o->unpack_data; revs 450 diff-lib.c if (ce_path_match(idx ? idx : tree, &revs->prune_data, NULL)) { revs 452 diff-lib.c if (diff_can_quit_early(&revs->diffopt)) { revs 461 diff-lib.c static int diff_cache(struct rev_info *revs, revs 478 diff-lib.c !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER)); revs 481 diff-lib.c opts.unpack_data = revs; revs 484 diff-lib.c opts.pathspec = &revs->diffopt.pathspec; revs 491 diff-lib.c int run_diff_index(struct rev_info *revs, int cached) revs 495 diff-lib.c ent = revs->pending.objects; revs 496 diff-lib.c if (diff_cache(revs, ent->item->sha1, ent->name, cached)) revs 499 diff-lib.c diff_set_mnemonic_prefix(&revs->diffopt, "c/", cached ? "i/" : "w/"); revs 500 diff-lib.c diffcore_fix_diff_index(&revs->diffopt); revs 501 diff-lib.c diffcore_std(&revs->diffopt); revs 502 diff-lib.c diff_flush(&revs->diffopt); revs 508 diff-lib.c struct rev_info revs; revs 510 diff-lib.c init_revisions(&revs, NULL); revs 511 diff-lib.c copy_pathspec(&revs.prune_data, &opt->pathspec); revs 512 diff-lib.c revs.diffopt = *opt; revs 514 diff-lib.c if (diff_cache(&revs, tree_sha1, NULL, 1)) revs 241 diff-no-index.c void diff_no_index(struct rev_info *revs, revs 249 diff-no-index.c diff_setup(&revs->diffopt); revs 257 diff-no-index.c j = diff_opt_parse(&revs->diffopt, argv + i, argc - i); revs 280 diff-no-index.c revs->diffopt.skip_stat_unmatch = 1; revs 281 diff-no-index.c if (!revs->diffopt.output_format) revs 282 diff-no-index.c revs->diffopt.output_format = DIFF_FORMAT_PATCH; revs 284 diff-no-index.c DIFF_OPT_SET(&revs->diffopt, NO_INDEX); revs 286 diff-no-index.c revs->max_count = -2; revs 287 diff-no-index.c diff_setup_done(&revs->diffopt); revs 289 diff-no-index.c setup_diff_pager(&revs->diffopt); revs 290 diff-no-index.c DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS); revs 292 diff-no-index.c if (queue_diff(&revs->diffopt, paths[0], paths[1])) revs 294 diff-no-index.c diff_set_mnemonic_prefix(&revs->diffopt, "1/", "2/"); revs 295 diff-no-index.c diffcore_std(&revs->diffopt); revs 296 diff-no-index.c diff_flush(&revs->diffopt); revs 304 diff-no-index.c exit(diff_result_code(&revs->diffopt, 0)); revs 340 diff.h extern int run_diff_files(struct rev_info *revs, unsigned int option); revs 341 diff.h extern int run_diff_index(struct rev_info *revs, int cached); revs 92 graph.c struct rev_info *revs; revs 215 graph.c graph->revs = opt; revs 287 graph.c if (graph->revs && graph->revs->boundary) { revs 296 graph.c return get_commit_action(graph->revs, commit) == commit_show; revs 308 graph.c if (graph->revs->first_parent_only) revs 347 graph.c if (!want_color(graph->revs->diffopt.use_color)) revs 771 graph.c assert(graph->revs->boundary); revs 779 graph.c strbuf_addstr(sb, get_revision_mark(graph->revs, graph->commit)); revs 1337 http-push.c static int get_delta(struct rev_info *revs, struct remote_lock *lock) revs 1344 http-push.c while ((commit = get_revision(revs)) != NULL) { revs 1351 http-push.c for (i = 0; i < revs->pending.nr; i++) { revs 1352 http-push.c struct object_array_entry *entry = revs->pending.objects + i; revs 1722 http-push.c struct rev_info revs; revs 1964 http-push.c init_revisions(&revs, setup_git_directory()); revs 1965 http-push.c setup_revisions(commit_argc, commit_argv, &revs, NULL); revs 1966 http-push.c revs.edge_hint = 0; /* just in case */ revs 1975 http-push.c if (prepare_revision_walk(&revs)) revs 1977 http-push.c mark_edges_uninteresting(&revs, NULL); revs 1978 http-push.c objects_to_send = get_delta(&revs, ref_lock); revs 472 line-log.c static struct commit *check_single_commit(struct rev_info *revs) revs 478 line-log.c for (i = 0; i < revs->pending.nr; i++) { revs 479 line-log.c struct object *obj = revs->pending.objects[i].item; revs 485 line-log.c die("Non commit %s?", revs->pending.objects[i].name); revs 488 line-log.c revs->pending.objects[i].name, revs 489 line-log.c revs->pending.objects[found].name); revs 698 line-log.c static void add_line_range(struct rev_info *revs, struct commit *commit, revs 704 line-log.c old = lookup_decoration(&revs->line_log_data, &commit->object); revs 712 line-log.c add_decoration(&revs->line_log_data, &commit->object, new); revs 715 line-log.c static void clear_commit_line_range(struct rev_info *revs, struct commit *commit) revs 718 line-log.c r = lookup_decoration(&revs->line_log_data, &commit->object); revs 722 line-log.c add_decoration(&revs->line_log_data, &commit->object, NULL); revs 725 line-log.c static struct line_log_data *lookup_line_range(struct rev_info *revs, revs 731 line-log.c ret = lookup_decoration(&revs->line_log_data, &commit->object); revs 11 list-objects.c static void process_blob(struct rev_info *revs, revs 20 list-objects.c if (!revs->blob_objects) revs 52 list-objects.c static void process_gitlink(struct rev_info *revs, revs 62 list-objects.c static void process_tree(struct rev_info *revs, revs 74 list-objects.c enum interesting match = revs->diffopt.pathspec.nr == 0 ? revs 78 list-objects.c if (!revs->tree_objects) revs 84 list-objects.c if (parse_tree_gently(tree, revs->ignore_missing_links) < 0) { revs 85 list-objects.c if (revs->ignore_missing_links) revs 106 list-objects.c &revs->diffopt.pathspec); revs 114 list-objects.c process_tree(revs, revs 119 list-objects.c process_gitlink(revs, entry.sha1, revs 123 list-objects.c process_blob(revs, revs 133 list-objects.c struct rev_info *revs, revs 143 list-objects.c if (revs->edge_hint && !(parent->object.flags & SHOWN)) { revs 150 list-objects.c void mark_edges_uninteresting(struct rev_info *revs, show_edge_fn show_edge) revs 155 list-objects.c for (list = revs->commits; list; list = list->next) { revs 160 list-objects.c if (revs->edge_hint_aggressive && !(commit->object.flags & SHOWN)) { revs 166 list-objects.c mark_edge_parents_uninteresting(commit, revs, show_edge); revs 168 list-objects.c if (revs->edge_hint_aggressive) { revs 169 list-objects.c for (i = 0; i < revs->cmdline.nr; i++) { revs 170 list-objects.c struct object *obj = revs->cmdline.rev[i].item; revs 183 list-objects.c static void add_pending_tree(struct rev_info *revs, struct tree *tree) revs 185 list-objects.c add_pending_object(revs, &tree->object, ""); revs 188 list-objects.c void traverse_commit_list(struct rev_info *revs, revs 198 list-objects.c while ((commit = get_revision(revs)) != NULL) { revs 204 list-objects.c add_pending_tree(revs, commit->tree); revs 207 list-objects.c for (i = 0; i < revs->pending.nr; i++) { revs 208 list-objects.c struct object_array_entry *pending = revs->pending.objects + i; revs 222 list-objects.c process_tree(revs, (struct tree *)obj, show_object, revs 227 list-objects.c process_blob(revs, (struct blob *)obj, show_object, revs 234 list-objects.c object_array_clear(&revs->pending); revs 252 pack-bitmap-write.c struct rev_info revs; revs 260 pack-bitmap-write.c init_revisions(&revs, NULL); revs 261 pack-bitmap-write.c revs.tag_objects = 1; revs 262 pack-bitmap-write.c revs.tree_objects = 1; revs 263 pack-bitmap-write.c revs.blob_objects = 1; revs 264 pack-bitmap-write.c revs.no_walk = 0; revs 266 pack-bitmap-write.c revs.include_check = should_include; revs 291 pack-bitmap-write.c add_pending_object(&revs, object, ""); revs 292 pack-bitmap-write.c revs.include_check_data = base; revs 294 pack-bitmap-write.c if (prepare_revision_walk(&revs)) revs 297 pack-bitmap-write.c traverse_commit_list(&revs, show_commit, show_object, base); revs 299 pack-bitmap-write.c revs.pending.nr = 0; revs 300 pack-bitmap-write.c revs.pending.alloc = 0; revs 301 pack-bitmap-write.c revs.pending.objects = NULL; revs 492 pack-bitmap.c static struct bitmap *find_objects(struct rev_info *revs, revs 560 pack-bitmap.c add_pending_object(revs, object, ""); revs 576 pack-bitmap.c revs->include_check = should_include; revs 577 pack-bitmap.c revs->include_check_data = &incdata; revs 579 pack-bitmap.c if (prepare_revision_walk(revs)) revs 582 pack-bitmap.c traverse_commit_list(revs, show_commit, show_object, base); revs 665 pack-bitmap.c int prepare_bitmap_walk(struct rev_info *revs) revs 668 pack-bitmap.c unsigned int pending_nr = revs->pending.nr; revs 669 pack-bitmap.c struct object_array_entry *pending_e = revs->pending.objects; revs 729 pack-bitmap.c revs->pending.nr = 0; revs 730 pack-bitmap.c revs->pending.alloc = 0; revs 731 pack-bitmap.c revs->pending.objects = NULL; revs 734 pack-bitmap.c revs->ignore_missing_links = 1; revs 735 pack-bitmap.c haves_bitmap = find_objects(revs, haves, NULL); revs 737 pack-bitmap.c revs->ignore_missing_links = 0; revs 743 pack-bitmap.c wants_bitmap = find_objects(revs, wants, haves_bitmap); revs 933 pack-bitmap.c void test_bitmap_walk(struct rev_info *revs) revs 944 pack-bitmap.c if (revs->pending.nr != 1) revs 950 pack-bitmap.c root = revs->pending.objects[0].item; revs 966 pack-bitmap.c revs->tag_objects = 1; revs 967 pack-bitmap.c revs->tree_objects = 1; revs 968 pack-bitmap.c revs->blob_objects = 1; revs 972 pack-bitmap.c if (prepare_revision_walk(revs)) revs 979 pack-bitmap.c traverse_commit_list(revs, &test_show_commit, &test_show_object, &tdata); revs 40 pack-bitmap.h void test_bitmap_walk(struct rev_info *revs); revs 41 pack-bitmap.h int prepare_bitmap_walk(struct rev_info *revs); revs 28 reachable.c struct rev_info *revs = (struct rev_info *)cb_data; revs 37 reachable.c add_pending_object(revs, object, ""); revs 58 reachable.c struct rev_info *revs; revs 102 reachable.c add_pending_object(data->revs, obj, ""); revs 143 reachable.c int add_unseen_recent_objects_to_traversal(struct rev_info *revs, revs 149 reachable.c data.revs = revs; revs 160 reachable.c void mark_reachable_objects(struct rev_info *revs, int mark_reflog, revs 170 reachable.c revs->tag_objects = 1; revs 171 reachable.c revs->blob_objects = 1; revs 172 reachable.c revs->tree_objects = 1; revs 175 reachable.c add_index_objects_to_pending(revs, 0); revs 178 reachable.c for_each_ref(add_one_ref, revs); revs 181 reachable.c head_ref(add_one_ref, revs); revs 185 reachable.c add_reflogs_to_pending(revs, 0); revs 194 reachable.c if (prepare_revision_walk(revs)) revs 196 reachable.c traverse_commit_list(revs, mark_commit, mark_object, &cp); revs 199 reachable.c revs->ignore_missing_links = 1; revs 200 reachable.c if (add_unseen_recent_objects_to_traversal(revs, mark_recent)) revs 202 reachable.c if (prepare_revision_walk(revs)) revs 204 reachable.c traverse_commit_list(revs, mark_commit, mark_object, &cp); revs 5 reachable.h extern int add_unseen_recent_objects_to_traversal(struct rev_info *revs, revs 7 reachable.h extern void mark_reachable_objects(struct rev_info *revs, int mark_reflog, revs 2039 remote.c struct rev_info revs; revs 2081 remote.c init_revisions(&revs, NULL); revs 2082 remote.c setup_revisions(rev_argc, rev_argv, &revs, NULL); revs 2083 remote.c if (prepare_revision_walk(&revs)) revs 2090 remote.c struct commit *c = get_revision(&revs); revs 196 revision.c static void add_pending_object_with_path(struct rev_info *revs, revs 203 revision.c if (revs->no_walk && (obj->flags & UNINTERESTING)) revs 204 revision.c revs->no_walk = 0; revs 205 revision.c if (revs->reflog_info && obj->type == OBJ_COMMIT) { revs 212 revision.c st = add_reflog_for_walk(revs->reflog_info, revs 219 revision.c add_object_array_with_path(obj, name, &revs->pending, mode, path); revs 222 revision.c static void add_pending_object_with_mode(struct rev_info *revs, revs 226 revision.c add_pending_object_with_path(revs, obj, name, mode, NULL); revs 229 revision.c void add_pending_object(struct rev_info *revs, revs 232 revision.c add_pending_object_with_mode(revs, obj, name, S_IFINVALID); revs 235 revision.c void add_head_to_pending(struct rev_info *revs) revs 244 revision.c add_pending_object(revs, obj, "HEAD"); revs 247 revision.c static struct object *get_reference(struct rev_info *revs, const char *name, revs 255 revision.c if (revs->ignore_missing) revs 263 revision.c void add_pending_sha1(struct rev_info *revs, const char *name, revs 266 revision.c struct object *object = get_reference(revs, name, sha1, flags); revs 267 revision.c add_pending_object(revs, object, name); revs 270 revision.c static struct commit *handle_commit(struct rev_info *revs, revs 284 revision.c if (revs->tag_objects && !(flags & UNINTERESTING)) revs 285 revision.c add_pending_object(revs, object, tag->tag); revs 315 revision.c revs->limited = 1; revs 317 revision.c if (revs->show_source && !commit->util) revs 328 revision.c if (!revs->tree_objects) revs 334 revision.c add_pending_object_with_path(revs, object, name, mode, path); revs 342 revision.c if (!revs->blob_objects) revs 346 revision.c add_pending_object_with_path(revs, object, name, mode, path); revs 411 revision.c static struct commit *one_relevant_parent(const struct rev_info *revs, revs 425 revision.c if (revs->first_parent_only || !orig->next) revs 485 revision.c static int rev_compare_tree(struct rev_info *revs, revs 496 revision.c if (revs->simplify_by_decoration) { revs 510 revision.c if (!revs->prune_data.nr) revs 515 revision.c DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES); revs 517 revision.c &revs->pruning) < 0) revs 522 revision.c static int rev_same_tree_as_empty(struct rev_info *revs, struct commit *commit) revs 531 revision.c DIFF_OPT_CLR(&revs->pruning, HAS_CHANGES); revs 532 revision.c retval = diff_tree_sha1(NULL, t1->object.sha1, "", &revs->pruning); revs 542 revision.c static struct treesame_state *initialise_treesame(struct rev_info *revs, struct commit *commit) revs 547 revision.c add_decoration(&revs->treesame, &commit->object, st); revs 558 revision.c static int compact_treesame(struct rev_info *revs, struct commit *commit, unsigned nth_parent) revs 571 revision.c if (rev_same_tree_as_empty(revs, commit)) revs 578 revision.c st = lookup_decoration(&revs->treesame, &commit->object); revs 595 revision.c if (st->treesame[0] && revs->dense) revs 599 revision.c free(add_decoration(&revs->treesame, &commit->object, NULL)); revs 605 revision.c static unsigned update_treesame(struct rev_info *revs, struct commit *commit) revs 614 revision.c st = lookup_decoration(&revs->treesame, &commit->object); revs 635 revision.c static inline int limiting_can_increase_treesame(const struct rev_info *revs) revs 645 revision.c return revs->prune && revs->dense && revs 646 revision.c !revs->simplify_history && revs 647 revision.c !revs->first_parent_only; revs 650 revision.c static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit) revs 660 revision.c if (!revs->prune) revs 667 revision.c if (rev_same_tree_as_empty(revs, commit)) revs 676 revision.c if (!revs->dense && !commit->parents->next) revs 696 revision.c if (revs->first_parent_only) revs 704 revision.c if (revs->treesame.name && revs 705 revision.c !revs->simplify_history && revs 707 revision.c ts = initialise_treesame(revs, commit); revs 716 revision.c switch (rev_compare_tree(revs, p, commit)) { revs 718 revision.c if (!revs->simplify_history || !relevant_commit(p)) { revs 735 revision.c if (revs->remove_empty_trees && revs 736 revision.c rev_same_tree_as_empty(revs, p)) { revs 791 revision.c static int add_parents_to_list(struct rev_info *revs, struct commit *commit, revs 802 revision.c if (revs->include_check && revs 803 revision.c !revs->include_check(commit, revs->include_check_data)) revs 841 revision.c try_to_simplify_commit(revs, commit); revs 843 revision.c if (revs->no_walk) revs 851 revision.c if (parse_commit_gently(p, revs->ignore_missing_links) < 0) revs 853 revision.c if (revs->show_source && !p->util) revs 860 revision.c if (revs->first_parent_only) revs 866 revision.c static void cherry_pick_list(struct commit_list *list, struct rev_info *revs) revs 891 revision.c ids.diffopts.pathspec = revs->diffopt.pathspec; revs 911 revision.c cherry_flag = revs->cherry_mark ? PATCHSAME : SHOWN; revs 1072 revision.c static void limit_left_right(struct commit_list *list, struct rev_info *revs) revs 1079 revision.c if (revs->right_only) { revs 1088 revision.c static int limit_list(struct rev_info *revs) revs 1092 revision.c struct commit_list *list = revs->commits; revs 1098 revision.c if (revs->ancestry_path) { revs 1116 revision.c if (revs->max_age != -1 && (commit->date < revs->max_age)) revs 1118 revision.c if (add_parents_to_list(revs, commit, &list, NULL) < 0) revs 1122 revision.c if (revs->show_all) revs 1128 revision.c if (revs->show_all) revs 1132 revision.c if (revs->min_age != -1 && (commit->date > revs->min_age)) revs 1141 revision.c show(revs, newlist); revs 1144 revision.c if (revs->cherry_pick || revs->cherry_mark) revs 1145 revision.c cherry_pick_list(newlist, revs); revs 1147 revision.c if (revs->left_only || revs->right_only) revs 1148 revision.c limit_left_right(newlist, revs); revs 1159 revision.c if (limiting_can_increase_treesame(revs)) revs 1164 revision.c update_treesame(revs, c); revs 1167 revision.c revs->commits = newlist; revs 1175 revision.c static void add_rev_cmdline(struct rev_info *revs, revs 1181 revision.c struct rev_cmdline_info *info = &revs->cmdline; revs 1192 revision.c static void add_rev_cmdline_list(struct rev_info *revs, revs 1199 revision.c add_rev_cmdline(revs, object, sha1_to_hex(object->sha1), revs 1240 revision.c static void init_all_refs_cb(struct all_refs_cb *cb, struct rev_info *revs, revs 1243 revision.c cb->all_revs = revs; revs 1265 revision.c static void handle_refs(const char *submodule, struct rev_info *revs, unsigned flags, revs 1269 revision.c init_all_refs_cb(&cb, revs, flags); revs 1310 revision.c void add_reflogs_to_pending(struct rev_info *revs, unsigned flags) revs 1314 revision.c cb.all_revs = revs; revs 1319 revision.c static void add_cache_tree(struct cache_tree *it, struct rev_info *revs, revs 1327 revision.c add_pending_object_with_path(revs, &tree->object, "", revs 1334 revision.c add_cache_tree(sub->cache_tree, revs, path); revs 1340 revision.c void add_index_objects_to_pending(struct rev_info *revs, unsigned flags) revs 1355 revision.c add_pending_object_with_path(revs, &blob->object, "", revs 1361 revision.c add_cache_tree(active_cache_tree, revs, &path); revs 1366 revision.c static int add_parents_only(struct rev_info *revs, const char *arg_, int flags) revs 1381 revision.c it = get_reference(revs, arg, sha1, 0); revs 1382 revision.c if (!it && revs->ignore_missing) revs 1396 revision.c add_rev_cmdline(revs, it, arg_, REV_CMD_PARENTS_ONLY, flags); revs 1397 revision.c add_pending_object(revs, it, arg); revs 1402 revision.c void init_revisions(struct rev_info *revs, const char *prefix) revs 1404 revision.c memset(revs, 0, sizeof(*revs)); revs 1406 revision.c revs->abbrev = DEFAULT_ABBREV; revs 1407 revision.c revs->ignore_merges = 1; revs 1408 revision.c revs->simplify_history = 1; revs 1409 revision.c DIFF_OPT_SET(&revs->pruning, RECURSIVE); revs 1410 revision.c DIFF_OPT_SET(&revs->pruning, QUICK); revs 1411 revision.c revs->pruning.add_remove = file_add_remove; revs 1412 revision.c revs->pruning.change = file_change; revs 1413 revision.c revs->sort_order = REV_SORT_IN_GRAPH_ORDER; revs 1414 revision.c revs->dense = 1; revs 1415 revision.c revs->prefix = prefix; revs 1416 revision.c revs->max_age = -1; revs 1417 revision.c revs->min_age = -1; revs 1418 revision.c revs->skip_count = -1; revs 1419 revision.c revs->max_count = -1; revs 1420 revision.c revs->max_parents = -1; revs 1422 revision.c revs->commit_format = CMIT_FMT_DEFAULT; revs 1425 revision.c grep_init(&revs->grep_filter, prefix); revs 1426 revision.c revs->grep_filter.status_only = 1; revs 1427 revision.c revs->grep_filter.regflags = REG_NEWLINE; revs 1429 revision.c diff_setup(&revs->diffopt); revs 1430 revision.c if (prefix && !revs->diffopt.prefix) { revs 1431 revision.c revs->diffopt.prefix = prefix; revs 1432 revision.c revs->diffopt.prefix_length = strlen(prefix); revs 1435 revision.c revs->notes_opt.use_default_notes = -1; revs 1438 revision.c static void add_pending_commit_list(struct rev_info *revs, revs 1445 revision.c add_pending_object(revs, object, sha1_to_hex(object->sha1)); revs 1450 revision.c static void prepare_show_merge(struct rev_info *revs) revs 1464 revision.c add_pending_object(revs, &head->object, "HEAD"); revs 1465 revision.c add_pending_object(revs, &other->object, "MERGE_HEAD"); revs 1467 revision.c add_rev_cmdline_list(revs, bases, REV_CMD_MERGE_BASE, UNINTERESTING | BOTTOM); revs 1468 revision.c add_pending_commit_list(revs, bases, UNINTERESTING | BOTTOM); revs 1478 revision.c if (ce_path_match(ce, &revs->prune_data, NULL)) { revs 1488 revision.c free_pathspec(&revs->prune_data); revs 1489 revision.c parse_pathspec(&revs->prune_data, PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL, revs 1491 revision.c revs->limited = 1; revs 1494 revision.c int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsigned revarg_opt) revs 1541 revision.c verify_non_filename(revs->prefix, arg); revs 1548 revision.c if (revs->ignore_missing) revs 1572 revision.c add_rev_cmdline_list(revs, exclude, revs 1575 revision.c add_pending_commit_list(revs, exclude, revs 1584 revision.c add_rev_cmdline(revs, a_obj, this, revs 1586 revision.c add_rev_cmdline(revs, b_obj, next, revs 1588 revision.c add_pending_object(revs, a_obj, this); revs 1589 revision.c add_pending_object(revs, b_obj, next); revs 1597 revision.c if (add_parents_only(revs, arg, flags)) revs 1604 revision.c if (!add_parents_only(revs, arg, flags ^ (UNINTERESTING | BOTTOM))) revs 1618 revision.c return revs->ignore_missing ? 0 : -1; revs 1620 revision.c verify_non_filename(revs->prefix, arg); revs 1621 revision.c object = get_reference(revs, arg, sha1, flags ^ local_flags); revs 1622 revision.c add_rev_cmdline(revs, object, arg_, REV_CMD_REV, flags ^ local_flags); revs 1623 revision.c add_pending_object_with_mode(revs, object, arg, oc.mode); revs 1641 revision.c static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb, revs 1653 revision.c static void read_revisions_from_stdin(struct rev_info *revs, revs 1677 revision.c if (handle_revision_arg(sb.buf, revs, 0, revs 1682 revision.c read_pathspec_from_stdin(revs, &sb, prune); revs 1688 revision.c static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what) revs 1690 revision.c append_grep_pattern(&revs->grep_filter, ptn, "command line", 0, what); revs 1693 revision.c static void add_header_grep(struct rev_info *revs, enum grep_header_field field, const char *pattern) revs 1695 revision.c append_header_grep_pattern(&revs->grep_filter, field, pattern); revs 1698 revision.c static void add_message_grep(struct rev_info *revs, const char *pattern) revs 1700 revision.c add_grep(revs, pattern, GREP_PATTERN_BODY); revs 1703 revision.c static int handle_revision_opt(struct rev_info *revs, int argc, const char **argv, revs 1726 revision.c revs->max_count = atoi(optarg); revs 1727 revision.c revs->no_walk = 0; revs 1730 revision.c revs->skip_count = atoi(optarg); revs 1734 revision.c if (strtol_i(arg + 1, 10, &revs->max_count) < 0 || revs 1735 revision.c revs->max_count < 0) revs 1737 revision.c revs->no_walk = 0; revs 1741 revision.c revs->max_count = atoi(argv[1]); revs 1742 revision.c revs->no_walk = 0; revs 1745 revision.c revs->max_count = atoi(arg + 2); revs 1746 revision.c revs->no_walk = 0; revs 1748 revision.c revs->max_age = atoi(optarg); revs 1751 revision.c revs->max_age = approxidate(optarg); revs 1754 revision.c revs->max_age = approxidate(optarg); revs 1757 revision.c revs->min_age = atoi(optarg); revs 1760 revision.c revs->min_age = approxidate(optarg); revs 1763 revision.c revs->min_age = approxidate(optarg); revs 1766 revision.c revs->first_parent_only = 1; revs 1768 revision.c revs->ancestry_path = 1; revs 1769 revision.c revs->simplify_history = 0; revs 1770 revision.c revs->limited = 1; revs 1772 revision.c init_reflog_walk(&revs->reflog_info); revs 1776 revision.c revs->def = argv[1]; revs 1779 revision.c revs->show_merge = 1; revs 1781 revision.c revs->sort_order = REV_SORT_IN_GRAPH_ORDER; revs 1782 revision.c revs->topo_order = 1; revs 1784 revision.c revs->simplify_merges = 1; revs 1785 revision.c revs->topo_order = 1; revs 1786 revision.c revs->rewrite_parents = 1; revs 1787 revision.c revs->simplify_history = 0; revs 1788 revision.c revs->limited = 1; revs 1790 revision.c revs->simplify_merges = 1; revs 1791 revision.c revs->topo_order = 1; revs 1792 revision.c revs->rewrite_parents = 1; revs 1793 revision.c revs->simplify_history = 0; revs 1794 revision.c revs->simplify_by_decoration = 1; revs 1795 revision.c revs->limited = 1; revs 1796 revision.c revs->prune = 1; revs 1799 revision.c revs->sort_order = REV_SORT_BY_COMMIT_DATE; revs 1800 revision.c revs->topo_order = 1; revs 1802 revision.c revs->sort_order = REV_SORT_BY_AUTHOR_DATE; revs 1803 revision.c revs->topo_order = 1; revs 1811 revision.c revs->topo_order = 1; revs 1812 revision.c revs->early_output = count; revs 1815 revision.c revs->rewrite_parents = 1; revs 1816 revision.c revs->print_parents = 1; revs 1818 revision.c revs->dense = 1; revs 1820 revision.c revs->dense = 0; revs 1822 revision.c revs->show_all = 1; revs 1824 revision.c revs->remove_empty_trees = 1; revs 1826 revision.c revs->min_parents = 2; revs 1828 revision.c revs->max_parents = 1; revs 1830 revision.c revs->min_parents = atoi(arg+14); revs 1832 revision.c revs->min_parents = 0; revs 1834 revision.c revs->max_parents = atoi(arg+14); revs 1836 revision.c revs->max_parents = -1; revs 1838 revision.c revs->boundary = 1; revs 1840 revision.c revs->left_right = 1; revs 1842 revision.c if (revs->right_only) revs 1845 revision.c revs->left_only = 1; revs 1847 revision.c if (revs->left_only) revs 1849 revision.c revs->right_only = 1; revs 1851 revision.c if (revs->left_only) revs 1853 revision.c revs->cherry_mark = 1; revs 1854 revision.c revs->right_only = 1; revs 1855 revision.c revs->max_parents = 1; revs 1856 revision.c revs->limited = 1; revs 1858 revision.c revs->count = 1; revs 1860 revision.c if (revs->cherry_pick) revs 1862 revision.c revs->cherry_mark = 1; revs 1863 revision.c revs->limited = 1; /* needs limit_list() */ revs 1865 revision.c if (revs->cherry_mark) revs 1867 revision.c revs->cherry_pick = 1; revs 1868 revision.c revs->limited = 1; revs 1870 revision.c revs->tag_objects = 1; revs 1871 revision.c revs->tree_objects = 1; revs 1872 revision.c revs->blob_objects = 1; revs 1874 revision.c revs->tag_objects = 1; revs 1875 revision.c revs->tree_objects = 1; revs 1876 revision.c revs->blob_objects = 1; revs 1877 revision.c revs->edge_hint = 1; revs 1879 revision.c revs->tag_objects = 1; revs 1880 revision.c revs->tree_objects = 1; revs 1881 revision.c revs->blob_objects = 1; revs 1882 revision.c revs->edge_hint = 1; revs 1883 revision.c revs->edge_hint_aggressive = 1; revs 1885 revision.c revs->tag_objects = 1; revs 1886 revision.c revs->tree_objects = 1; revs 1887 revision.c revs->blob_objects = 1; revs 1888 revision.c revs->verify_objects = 1; revs 1890 revision.c revs->unpacked = 1; revs 1894 revision.c revs->diff = 1; revs 1895 revision.c DIFF_OPT_SET(&revs->diffopt, RECURSIVE); revs 1897 revision.c revs->diff = 1; revs 1898 revision.c DIFF_OPT_SET(&revs->diffopt, RECURSIVE); revs 1899 revision.c DIFF_OPT_SET(&revs->diffopt, TREE_IN_RECURSIVE); revs 1901 revision.c revs->ignore_merges = 0; revs 1903 revision.c revs->diff = 1; revs 1904 revision.c revs->dense_combined_merges = 0; revs 1905 revision.c revs->combine_merges = 1; revs 1907 revision.c revs->diff = 1; revs 1908 revision.c revs->dense_combined_merges = 1; revs 1909 revision.c revs->combine_merges = 1; revs 1911 revision.c revs->verbose_header = 1; revs 1913 revision.c revs->verbose_header = 1; revs 1914 revision.c revs->pretty_given = 1; revs 1915 revision.c get_commit_format(NULL, revs); revs 1921 revision.c revs->verbose_header = 1; revs 1922 revision.c revs->pretty_given = 1; revs 1923 revision.c get_commit_format(arg+9, revs); revs 1925 revision.c revs->show_notes = 1; revs 1926 revision.c revs->show_notes_given = 1; revs 1927 revision.c revs->notes_opt.use_default_notes = 1; revs 1929 revision.c revs->show_signature = 1; revs 1933 revision.c revs->break_bar = xstrdup(arg + 20); revs 1935 revision.c revs->break_bar = " .........."; revs 1936 revision.c revs->track_linear = 1; revs 1937 revision.c revs->track_first_time = 1; revs 1941 revision.c revs->show_notes = 1; revs 1942 revision.c revs->show_notes_given = 1; revs 1944 revision.c if (revs->notes_opt.use_default_notes < 0) revs 1945 revision.c revs->notes_opt.use_default_notes = 1; revs 1951 revision.c string_list_append(&revs->notes_opt.extra_notes_refs, revs 1954 revision.c revs->show_notes = 0; revs 1955 revision.c revs->show_notes_given = 1; revs 1956 revision.c revs->notes_opt.use_default_notes = -1; revs 1959 revision.c revs->notes_opt.extra_notes_refs.strdup_strings = 1; revs 1960 revision.c string_list_clear(&revs->notes_opt.extra_notes_refs, 0); revs 1961 revision.c revs->notes_opt.extra_notes_refs.strdup_strings = 0; revs 1963 revision.c revs->show_notes_given = 1; revs 1964 revision.c revs->notes_opt.use_default_notes = 1; revs 1966 revision.c revs->notes_opt.use_default_notes = 0; revs 1968 revision.c revs->verbose_header = 1; revs 1969 revision.c get_commit_format("oneline", revs); revs 1970 revision.c revs->pretty_given = 1; revs 1971 revision.c revs->abbrev_commit = 1; revs 1973 revision.c revs->topo_order = 1; revs 1974 revision.c revs->rewrite_parents = 1; revs 1975 revision.c revs->graph = graph_init(revs); revs 1977 revision.c revs->show_root_diff = 1; revs 1979 revision.c revs->no_commit_id = 1; revs 1981 revision.c revs->always_show_header = 1; revs 1983 revision.c revs->abbrev = 0; revs 1985 revision.c revs->abbrev = DEFAULT_ABBREV; revs 1987 revision.c revs->abbrev = strtoul(arg + 9, NULL, 10); revs 1988 revision.c if (revs->abbrev < MINIMUM_ABBREV) revs 1989 revision.c revs->abbrev = MINIMUM_ABBREV; revs 1990 revision.c else if (revs->abbrev > 40) revs 1991 revision.c revs->abbrev = 40; revs 1993 revision.c revs->abbrev_commit = 1; revs 1994 revision.c revs->abbrev_commit_given = 1; revs 1996 revision.c revs->abbrev_commit = 0; revs 1998 revision.c revs->diff = 1; revs 1999 revision.c revs->full_diff = 1; revs 2001 revision.c revs->simplify_history = 0; revs 2003 revision.c revs->date_mode.type = DATE_RELATIVE; revs 2004 revision.c revs->date_mode_explicit = 1; revs 2006 revision.c parse_date_format(optarg, &revs->date_mode); revs 2007 revision.c revs->date_mode_explicit = 1; revs 2010 revision.c revs->show_log_size = 1; revs 2016 revision.c add_header_grep(revs, GREP_HEADER_AUTHOR, optarg); revs 2019 revision.c add_header_grep(revs, GREP_HEADER_COMMITTER, optarg); revs 2022 revision.c add_header_grep(revs, GREP_HEADER_REFLOG, optarg); revs 2025 revision.c add_message_grep(revs, optarg); revs 2028 revision.c revs->grep_filter.debug = 1; revs 2030 revision.c grep_set_pattern_type_option(GREP_PATTERN_TYPE_BRE, &revs->grep_filter); revs 2032 revision.c grep_set_pattern_type_option(GREP_PATTERN_TYPE_ERE, &revs->grep_filter); revs 2034 revision.c revs->grep_filter.regflags |= REG_ICASE; revs 2035 revision.c DIFF_OPT_SET(&revs->diffopt, PICKAXE_IGNORE_CASE); revs 2037 revision.c grep_set_pattern_type_option(GREP_PATTERN_TYPE_FIXED, &revs->grep_filter); revs 2039 revision.c grep_set_pattern_type_option(GREP_PATTERN_TYPE_PCRE, &revs->grep_filter); revs 2041 revision.c revs->grep_filter.all_match = 1; revs 2043 revision.c revs->invert_grep = 1; revs 2051 revision.c revs->reverse ^= 1; revs 2053 revision.c revs->children.name = "children"; revs 2054 revision.c revs->limited = 1; revs 2056 revision.c revs->ignore_missing = 1; revs 2058 revision.c int opts = diff_opt_parse(&revs->diffopt, argv, argc); revs 2063 revision.c if (revs->graph && revs->track_linear) revs 2069 revision.c void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx, revs 2073 revision.c int n = handle_revision_opt(revs, ctx->argc, ctx->argv, revs 2103 revision.c struct rev_info *revs, revs 2121 revision.c handle_refs(submodule, revs, *flags, for_each_ref_submodule); revs 2122 revision.c handle_refs(submodule, revs, *flags, head_ref_submodule); revs 2123 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2125 revision.c handle_refs(submodule, revs, *flags, for_each_branch_ref_submodule); revs 2126 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2129 revision.c handle_refs(submodule, revs, *flags, for_each_bad_bisect_ref); revs 2130 revision.c handle_refs(submodule, revs, *flags ^ (UNINTERESTING | BOTTOM), for_each_good_bisect_ref); revs 2131 revision.c revs->bisect = 1; revs 2133 revision.c handle_refs(submodule, revs, *flags, for_each_tag_ref_submodule); revs 2134 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2136 revision.c handle_refs(submodule, revs, *flags, for_each_remote_ref_submodule); revs 2137 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2140 revision.c init_all_refs_cb(&cb, revs, *flags); revs 2142 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2145 revision.c add_ref_exclusion(&revs->ref_excludes, optarg); revs 2149 revision.c init_all_refs_cb(&cb, revs, *flags); revs 2151 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2154 revision.c init_all_refs_cb(&cb, revs, *flags); revs 2156 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2159 revision.c init_all_refs_cb(&cb, revs, *flags); revs 2161 revision.c clear_ref_exclusion(&revs->ref_excludes); revs 2163 revision.c add_reflogs_to_pending(revs, *flags); revs 2165 revision.c add_index_objects_to_pending(revs, *flags); revs 2169 revision.c revs->no_walk = REVISION_WALK_NO_WALK_SORTED; revs 2176 revision.c revs->no_walk = REVISION_WALK_NO_WALK_SORTED; revs 2178 revision.c revs->no_walk = REVISION_WALK_NO_WALK_UNSORTED; revs 2182 revision.c revs->no_walk = 0; revs 2212 revision.c int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *opt) revs 2252 revision.c revs, argc - i, argv + i, revs 2260 revision.c if (revs->disable_stdin) { revs 2266 revision.c read_revisions_from_stdin(revs, &prune_data); revs 2270 revision.c opts = handle_revision_opt(revs, argc - i, argv + i, &left, argv); revs 2281 revision.c if (handle_revision_arg(arg, revs, flags, revarg_opt)) { revs 2293 revision.c verify_filename(revs->prefix, argv[j], j == i); revs 2319 revision.c parse_pathspec(&revs->prune_data, 0, 0, revs 2320 revision.c revs->prefix, prune_data.path); revs 2323 revision.c if (revs->def == NULL) revs 2324 revision.c revs->def = opt ? opt->def : NULL; revs 2326 revision.c opt->tweak(revs, opt); revs 2327 revision.c if (revs->show_merge) revs 2328 revision.c prepare_show_merge(revs); revs 2329 revision.c if (revs->def && !revs->pending.nr && !got_rev_arg) { revs 2333 revision.c if (get_sha1_with_context(revs->def, 0, sha1, &oc)) revs 2334 revision.c diagnose_missing_default(revs->def); revs 2335 revision.c object = get_reference(revs, revs->def, sha1, 0); revs 2336 revision.c add_pending_object_with_mode(revs, object, revs->def, oc.mode); revs 2340 revision.c if (revs->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT) revs 2341 revision.c revs->diff = 1; revs 2344 revision.c if (revs->diffopt.pickaxe || revs 2345 revision.c revs->diffopt.filter || revs 2346 revision.c DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES)) revs 2347 revision.c revs->diff = 1; revs 2349 revision.c if (revs->topo_order) revs 2350 revision.c revs->limited = 1; revs 2352 revision.c if (revs->prune_data.nr) { revs 2353 revision.c copy_pathspec(&revs->pruning.pathspec, &revs->prune_data); revs 2355 revision.c if (!DIFF_OPT_TST(&revs->diffopt, FOLLOW_RENAMES)) revs 2356 revision.c revs->prune = 1; revs 2357 revision.c if (!revs->full_diff) revs 2358 revision.c copy_pathspec(&revs->diffopt.pathspec, revs 2359 revision.c &revs->prune_data); revs 2361 revision.c if (revs->combine_merges) revs 2362 revision.c revs->ignore_merges = 0; revs 2363 revision.c revs->diffopt.abbrev = revs->abbrev; revs 2365 revision.c if (revs->line_level_traverse) { revs 2366 revision.c revs->limited = 1; revs 2367 revision.c revs->topo_order = 1; revs 2370 revision.c diff_setup_done(&revs->diffopt); revs 2373 revision.c &revs->grep_filter); revs 2374 revision.c compile_grep_patterns(&revs->grep_filter); revs 2376 revision.c if (revs->reverse && revs->reflog_info) revs 2378 revision.c if (revs->rewrite_parents && revs->children.name) revs 2384 revision.c if (revs->reverse && revs->graph) revs 2387 revision.c if (revs->reflog_info && revs->graph) revs 2389 revision.c if (revs->no_walk && revs->graph) revs 2391 revision.c if (!revs->reflog_info && revs->grep_filter.use_reflog_filter) revs 2394 revision.c if (revs->first_parent_only && revs->bisect) revs 2400 revision.c static void add_child(struct rev_info *revs, struct commit *parent, struct commit *child) revs 2405 revision.c l->next = add_decoration(&revs->children, &parent->object, l); revs 2408 revision.c static int remove_duplicate_parents(struct rev_info *revs, struct commit *commit) revs 2410 revision.c struct treesame_state *ts = lookup_decoration(&revs->treesame, &commit->object); revs 2422 revision.c compact_treesame(revs, commit, surviving_parents); revs 2441 revision.c static struct merge_simplify_state *locate_simplify_state(struct rev_info *revs, struct commit *commit) revs 2445 revision.c st = lookup_decoration(&revs->merge_simplification, &commit->object); revs 2448 revision.c add_decoration(&revs->merge_simplification, &commit->object, st); revs 2453 revision.c static int mark_redundant_parents(struct rev_info *revs, struct commit *commit) revs 2489 revision.c static int mark_treesame_root_parents(struct rev_info *revs, struct commit *commit) revs 2510 revision.c static int leave_one_treesame_to_parent(struct rev_info *revs, struct commit *commit) revs 2512 revision.c struct treesame_state *ts = lookup_decoration(&revs->treesame, &commit->object); revs 2572 revision.c static int remove_marked_parents(struct rev_info *revs, struct commit *commit) revs 2586 revision.c compact_treesame(revs, commit, nth_parent); revs 2595 revision.c update_treesame(revs, commit); revs 2600 revision.c static struct commit_list **simplify_one(struct rev_info *revs, struct commit *commit, struct commit_list **tail) revs 2607 revision.c st = locate_simplify_state(revs, commit); revs 2631 revision.c pst = locate_simplify_state(revs, p->item); revs 2636 revision.c if (revs->first_parent_only) revs 2650 revision.c pst = locate_simplify_state(revs, p->item); revs 2652 revision.c if (revs->first_parent_only) revs 2656 revision.c if (revs->first_parent_only) revs 2659 revision.c cnt = remove_duplicate_parents(revs, commit); revs 2681 revision.c int marked = mark_redundant_parents(revs, commit); revs 2682 revision.c marked += mark_treesame_root_parents(revs, commit); revs 2684 revision.c marked -= leave_one_treesame_to_parent(revs, commit); revs 2686 revision.c cnt = remove_marked_parents(revs, commit); revs 2702 revision.c (parent = one_relevant_parent(revs, commit->parents)) == NULL) revs 2705 revision.c pst = locate_simplify_state(revs, parent); revs 2711 revision.c static void simplify_merges(struct rev_info *revs) revs 2717 revision.c if (!revs->prune) revs 2722 revision.c for (list = revs->commits; list; list = next) { revs 2740 revision.c tail = simplify_one(revs, commit, tail); revs 2745 revision.c list = revs->commits; revs 2746 revision.c revs->commits = NULL; revs 2747 revision.c tail = &revs->commits; revs 2755 revision.c st = locate_simplify_state(revs, commit); revs 2761 revision.c static void set_children(struct rev_info *revs) revs 2764 revision.c for (l = revs->commits; l; l = l->next) { revs 2769 revision.c add_child(revs, p->item, commit); revs 2778 revision.c int prepare_revision_walk(struct rev_info *revs) revs 2782 revision.c struct commit_list **next = &revs->commits; revs 2784 revision.c memcpy(&old_pending, &revs->pending, sizeof(old_pending)); revs 2785 revision.c revs->pending.nr = 0; revs 2786 revision.c revs->pending.alloc = 0; revs 2787 revision.c revs->pending.objects = NULL; revs 2790 revision.c struct commit *commit = handle_commit(revs, e); revs 2798 revision.c if (!revs->leak_pending) revs 2802 revision.c if (revs->simplify_merges || revs 2803 revision.c (revs->limited && limiting_can_increase_treesame(revs))) revs 2804 revision.c revs->treesame.name = "treesame"; revs 2806 revision.c if (revs->no_walk != REVISION_WALK_NO_WALK_UNSORTED) revs 2807 revision.c commit_list_sort_by_date(&revs->commits); revs 2808 revision.c if (revs->no_walk) revs 2810 revision.c if (revs->limited) revs 2811 revision.c if (limit_list(revs) < 0) revs 2813 revision.c if (revs->topo_order) revs 2814 revision.c sort_in_topological_order(&revs->commits, revs->sort_order); revs 2815 revision.c if (revs->line_level_traverse) revs 2816 revision.c line_log_filter(revs); revs 2817 revision.c if (revs->simplify_merges) revs 2818 revision.c simplify_merges(revs); revs 2819 revision.c if (revs->children.name) revs 2820 revision.c set_children(revs); revs 2824 revision.c static enum rewrite_result rewrite_one(struct rev_info *revs, struct commit **pp) revs 2830 revision.c if (!revs->limited) revs 2831 revision.c if (add_parents_to_list(revs, p, &revs->commits, &cache) < 0) revs 2839 revision.c if ((p = one_relevant_parent(revs, p->parents)) == NULL) revs 2845 revision.c int rewrite_parents(struct rev_info *revs, struct commit *commit, revs 2851 revision.c switch (rewrite_parent(revs, &parent->item)) { revs 2862 revision.c remove_duplicate_parents(revs, commit); revs 2975 revision.c static inline int want_ancestry(const struct rev_info *revs) revs 2977 revision.c return (revs->rewrite_parents || revs->children.name); revs 2980 revision.c enum commit_action get_commit_action(struct rev_info *revs, struct commit *commit) revs 2984 revision.c if (revs->unpacked && has_sha1_pack(commit->object.sha1)) revs 2986 revision.c if (revs->show_all) revs 2990 revision.c if (revs->min_age != -1 && (commit->date > revs->min_age)) revs 2992 revision.c if (revs->min_parents || (revs->max_parents >= 0)) { revs 2994 revision.c if ((n < revs->min_parents) || revs 2995 revision.c ((revs->max_parents >= 0) && (n > revs->max_parents))) revs 2998 revision.c if (!commit_match(commit, revs)) revs 3000 revision.c if (revs->prune && revs->dense) { revs 3006 revision.c if (!want_ancestry(revs)) revs 3033 revision.c static void save_parents(struct rev_info *revs, struct commit *commit) revs 3037 revision.c if (!revs->saved_parents_slab) { revs 3038 revision.c revs->saved_parents_slab = xmalloc(sizeof(struct saved_parents)); revs 3039 revision.c init_saved_parents(revs->saved_parents_slab); revs 3042 revision.c pp = saved_parents_at(revs->saved_parents_slab, commit); revs 3061 revision.c static void free_saved_parents(struct rev_info *revs) revs 3063 revision.c if (revs->saved_parents_slab) revs 3064 revision.c clear_saved_parents(revs->saved_parents_slab); revs 3067 revision.c struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit) revs 3071 revision.c if (!revs->saved_parents_slab) revs 3074 revision.c parents = *saved_parents_at(revs->saved_parents_slab, commit); revs 3080 revision.c enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) revs 3082 revision.c enum commit_action action = get_commit_action(revs, commit); revs 3085 revision.c !revs->show_all && revs 3086 revision.c revs->prune && revs->dense && want_ancestry(revs)) { revs 3093 revision.c if (revs->full_diff) revs 3094 revision.c save_parents(revs, commit); revs 3095 revision.c if (rewrite_parents(revs, commit, rewrite_one) < 0) revs 3101 revision.c static void track_linear(struct rev_info *revs, struct commit *commit) revs 3103 revision.c if (revs->track_first_time) { revs 3104 revision.c revs->linear = 1; revs 3105 revision.c revs->track_first_time = 0; revs 3108 revision.c for (p = revs->previous_parents; p; p = p->next) revs 3112 revision.c revs->linear = p != NULL; revs 3114 revision.c if (revs->reverse) { revs 3115 revision.c if (revs->linear) revs 3118 revision.c free_commit_list(revs->previous_parents); revs 3119 revision.c revs->previous_parents = copy_commit_list(commit->parents); revs 3122 revision.c static struct commit *get_revision_1(struct rev_info *revs) revs 3124 revision.c if (!revs->commits) revs 3128 revision.c struct commit_list *entry = revs->commits; revs 3131 revision.c revs->commits = entry->next; revs 3134 revision.c if (revs->reflog_info) { revs 3135 revision.c save_parents(revs, commit); revs 3136 revision.c fake_reflog_parent(revs->reflog_info, commit); revs 3145 revision.c if (!revs->limited) { revs 3146 revision.c if (revs->max_age != -1 && revs 3147 revision.c (commit->date < revs->max_age)) revs 3149 revision.c if (add_parents_to_list(revs, commit, &revs->commits, NULL) < 0) { revs 3150 revision.c if (!revs->ignore_missing_links) revs 3156 revision.c switch (simplify_commit(revs, commit)) { revs 3163 revision.c if (revs->track_linear) revs 3164 revision.c track_linear(revs, commit); revs 3167 revision.c } while (revs->commits); revs 3190 revision.c static void create_boundary_commit_list(struct rev_info *revs) revs 3194 revision.c struct object_array *array = &revs->boundary_commits; revs 3203 revision.c if (revs->commits) { revs 3204 revision.c free_commit_list(revs->commits); revs 3205 revision.c revs->commits = NULL; revs 3221 revision.c commit_list_insert(c, &revs->commits); revs 3228 revision.c sort_in_topological_order(&revs->commits, revs->sort_order); revs 3231 revision.c static struct commit *get_revision_internal(struct rev_info *revs) revs 3236 revision.c if (revs->boundary == 2) { revs 3243 revision.c c = pop_commit(&revs->commits); revs 3259 revision.c if (revs->max_count) { revs 3260 revision.c c = get_revision_1(revs); revs 3262 revision.c while (revs->skip_count > 0) { revs 3263 revision.c revs->skip_count--; revs 3264 revision.c c = get_revision_1(revs); revs 3270 revision.c if (revs->max_count > 0) revs 3271 revision.c revs->max_count--; revs 3277 revision.c if (!revs->boundary) revs 3286 revision.c revs->boundary = 2; revs 3292 revision.c create_boundary_commit_list(revs); revs 3294 revision.c return get_revision_internal(revs); revs 3310 revision.c gc_boundary(&revs->boundary_commits); revs 3311 revision.c add_object_array(p, NULL, &revs->boundary_commits); revs 3317 revision.c struct commit *get_revision(struct rev_info *revs) revs 3322 revision.c if (revs->reverse) { revs 3324 revision.c while ((c = get_revision_internal(revs))) revs 3326 revision.c revs->commits = reversed; revs 3327 revision.c revs->reverse = 0; revs 3328 revision.c revs->reverse_output_stage = 1; revs 3331 revision.c if (revs->reverse_output_stage) { revs 3332 revision.c c = pop_commit(&revs->commits); revs 3333 revision.c if (revs->track_linear) revs 3334 revision.c revs->linear = !!(c && c->object.flags & TRACK_LINEAR); revs 3338 revision.c c = get_revision_internal(revs); revs 3339 revision.c if (c && revs->graph) revs 3340 revision.c graph_update(revs->graph, c); revs 3342 revision.c free_saved_parents(revs); revs 3343 revision.c if (revs->previous_parents) { revs 3344 revision.c free_commit_list(revs->previous_parents); revs 3345 revision.c revs->previous_parents = NULL; revs 3351 revision.c char *get_revision_mark(const struct rev_info *revs, const struct commit *commit) revs 3359 revision.c else if (!revs || revs->left_right) { revs 3364 revision.c } else if (revs->graph) revs 3366 revision.c else if (revs->cherry_mark) revs 3371 revision.c void put_revision_mark(const struct rev_info *revs, const struct commit *commit) revs 3373 revision.c char *mark = get_revision_mark(revs, commit); revs 237 revision.h extern void init_revisions(struct rev_info *revs, const char *prefix); revs 238 revision.h extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, revs 240 revision.h extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx, revs 245 revision.h extern int handle_revision_arg(const char *arg, struct rev_info *revs, revs 249 revision.h extern int prepare_revision_walk(struct rev_info *revs); revs 250 revision.h extern struct commit *get_revision(struct rev_info *revs); revs 251 revision.h extern char *get_revision_mark(const struct rev_info *revs, revs 253 revision.h extern void put_revision_mark(const struct rev_info *revs, revs 270 revision.h extern void add_pending_object(struct rev_info *revs, revs 272 revision.h extern void add_pending_sha1(struct rev_info *revs, revs 286 revision.h extern enum commit_action get_commit_action(struct rev_info *revs, revs 288 revision.h extern enum commit_action simplify_commit(struct rev_info *revs, revs 632 sequencer.c if (opts->action == REPLAY_PICK && !opts->revs->no_walk) revs 633 sequencer.c opts->revs->reverse ^= 1; revs 635 sequencer.c if (prepare_revision_walk(opts->revs)) revs 638 sequencer.c if (!opts->revs->commits) revs 816 sequencer.c while ((commit = get_revision(opts->revs))) revs 1035 sequencer.c assert(opts->revs); revs 1053 sequencer.c for (i = 0; i < opts->revs->pending.nr; i++) { revs 1055 sequencer.c const char *name = opts->revs->pending.objects[i].name; revs 1077 sequencer.c if (opts->revs->cmdline.nr == 1 && revs 1078 sequencer.c opts->revs->cmdline.rev->whence == REV_CMD_REV && revs 1079 sequencer.c opts->revs->no_walk && revs 1080 sequencer.c !opts->revs->cmdline.rev->flags) { revs 1082 sequencer.c if (prepare_revision_walk(opts->revs)) revs 1084 sequencer.c cmit = get_revision(opts->revs); revs 1085 sequencer.c if (!cmit || get_revision(opts->revs)) revs 48 sequencer.h struct rev_info *revs; revs 868 submodule.c struct rev_info revs; revs 877 submodule.c init_revisions(&revs, NULL); revs 879 submodule.c setup_revisions(ARRAY_SIZE(rev_args)-1, rev_args, &revs, &rev_opts); revs 882 submodule.c if (prepare_revision_walk(&revs)) revs 884 submodule.c while ((commit = get_revision(&revs)) != NULL) {