revision: drop --show-all option

This was an undocumented debugging aid that does not seem to have come in handy in the past decade, judging from its lack of mentions on the mailing list. Let's drop it in the name of simplicity. This is morally a revert of 3131b71301 (Add "--show-all" revision walker flag for debugging, 2008-02-09), but note that I did leave in the mapping of UNINTERESTING to "^" in get_revision_mark(). I don't think this would be possible to trigger with the current code, but it's the only sensible marker. We'll skip the usual deprecation period because this was explicitly a debugging aid that was never documented. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Feb 21, 2018 at 18:27 UTC f74bbc8dd2637498bc07132ae6bfa6d1b88dafb0
3 files changed -42
revision.c
-10
@@ -1055,14 +1055,9 @@ static int limit_list(struct rev_info *revs)
1055 return -1;
1056 if (obj->flags & UNINTERESTING) {
1057 mark_parents_uninteresting(commit);
1058 - if (revs->show_all)
1059 - p = &commit_list_insert(commit, p)->next;
1058 slop = still_interesting(list, date, slop, &interesting_cache);
1059 if (slop)
1060 continue;
1063 - /* If showing all, add the whole pending list to the end */
1064 - if (revs->show_all)
1065 - *p = list;
1061 break;
1062 }
1063 if (revs->min_age != -1 && (commit->date > revs->min_age))
@@ -1853,8 +1848,6 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
1848 revs->dense = 1;
1849 } else if (!strcmp(arg, "--sparse")) {
1850 revs->dense = 0;
1856 - } else if (!strcmp(arg, "--show-all")) {
1857 - revs->show_all = 1;
1851 } else if (!strcmp(arg, "--in-commit-order")) {
1852 revs->tree_blobs_in_commit_order = 1;
1853 } else if (!strcmp(arg, "--remove-empty")) {
@@ -3061,8 +3054,6 @@ enum commit_action get_commit_action(struct rev_info *revs, struct commit *commi
3054 return commit_ignore;
3055 if (revs->unpacked && has_sha1_pack(commit->object.oid.hash))
3056 return commit_ignore;
3064 - if (revs->show_all)
3065 - return commit_show;
3057 if (commit->object.flags & UNINTERESTING)
3058 return commit_ignore;
3059 if (revs->min_age != -1 &&
@@ -3161,7 +3152,6 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)
3152 enum commit_action action = get_commit_action(revs, commit);
3153
3154 if (action == commit_show &&
3164 - !revs->show_all &&
3155 revs->prune && revs->dense && want_ancestry(revs)) {
3156 /*
3157 * --full-diff on simplified parents is no good: it
revision.h
-1
@@ -90,7 +90,6 @@ struct rev_info {
90 unsigned int dense:1,
91 prune:1,
92 no_walk:2,
93 - show_all:1,
93 remove_empty_trees:1,
94 simplify_history:1,
95 topo_order:1,
t/t6015-rev-list-show-all-parents.sh deleted
-31
@@ -1,31 +0,0 @@
1 -#!/bin/sh
2 -
3 -test_description='--show-all --parents does not rewrite TREESAME commits'
4 -
5 -. ./test-lib.sh
6 -
7 -test_expect_success 'set up --show-all --parents test' '
8 - test_commit one foo.txt &&
9 - commit1=$(git rev-list -1 HEAD) &&
10 - test_commit two bar.txt &&
11 - commit2=$(git rev-list -1 HEAD) &&
12 - test_commit three foo.txt &&
13 - commit3=$(git rev-list -1 HEAD)
14 - '
15 -
16 -test_expect_success '--parents rewrites TREESAME parents correctly' '
17 - echo $commit3 $commit1 > expected &&
18 - echo $commit1 >> expected &&
19 - git rev-list --parents HEAD -- foo.txt > actual &&
20 - test_cmp expected actual
21 - '
22 -
23 -test_expect_success '--parents --show-all does not rewrites TREESAME parents' '
24 - echo $commit3 $commit2 > expected &&
25 - echo $commit2 $commit1 >> expected &&
26 - echo $commit1 >> expected &&
27 - git rev-list --parents --show-all HEAD -- foo.txt > actual &&
28 - test_cmp expected actual
29 - '
30 -
31 -test_done