revision: drop --show-all option
authorJeff King <peff@peff.net>
Wed, 21 Feb 2018 23:27:24 +0000 (18:27 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Feb 2018 20:15:25 +0000 (12:15 -0800)
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>
revision.c
revision.h
t/t6015-rev-list-show-all-parents.sh [deleted file]
index 1f7454c947a683eb2df28e51504bf67ebe8379cd..f4b1f725c29deb7ef520ba9e49389343380436dd 100644 (file)
@@ -1055,14 +1055,9 @@ static int limit_list(struct rev_info *revs)
                        return -1;
                if (obj->flags & UNINTERESTING) {
                        mark_parents_uninteresting(commit);
-                       if (revs->show_all)
-                               p = &commit_list_insert(commit, p)->next;
                        slop = still_interesting(list, date, slop, &interesting_cache);
                        if (slop)
                                continue;
-                       /* If showing all, add the whole pending list to the end */
-                       if (revs->show_all)
-                               *p = list;
                        break;
                }
                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
                revs->dense = 1;
        } else if (!strcmp(arg, "--sparse")) {
                revs->dense = 0;
-       } else if (!strcmp(arg, "--show-all")) {
-               revs->show_all = 1;
        } else if (!strcmp(arg, "--in-commit-order")) {
                revs->tree_blobs_in_commit_order = 1;
        } else if (!strcmp(arg, "--remove-empty")) {
@@ -3061,8 +3054,6 @@ enum commit_action get_commit_action(struct rev_info *revs, struct commit *commi
                return commit_ignore;
        if (revs->unpacked && has_sha1_pack(commit->object.oid.hash))
                return commit_ignore;
-       if (revs->show_all)
-               return commit_show;
        if (commit->object.flags & UNINTERESTING)
                return commit_ignore;
        if (revs->min_age != -1 &&
@@ -3161,7 +3152,6 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)
        enum commit_action action = get_commit_action(revs, commit);
 
        if (action == commit_show &&
-           !revs->show_all &&
            revs->prune && revs->dense && want_ancestry(revs)) {
                /*
                 * --full-diff on simplified parents is no good: it
index d7a35c8c9e752cea0ea05ee7e13d696814470a83..187406b6ebfde26e11681cd4884b118ed10cd84a 100644 (file)
@@ -90,7 +90,6 @@ struct rev_info {
        unsigned int    dense:1,
                        prune:1,
                        no_walk:2,
-                       show_all:1,
                        remove_empty_trees:1,
                        simplify_history:1,
                        topo_order:1,
diff --git a/t/t6015-rev-list-show-all-parents.sh b/t/t6015-rev-list-show-all-parents.sh
deleted file mode 100755 (executable)
index 3c73c93..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-test_description='--show-all --parents does not rewrite TREESAME commits'
-
-. ./test-lib.sh
-
-test_expect_success 'set up --show-all --parents test' '
-       test_commit one foo.txt &&
-       commit1=$(git rev-list -1 HEAD) &&
-       test_commit two bar.txt &&
-       commit2=$(git rev-list -1 HEAD) &&
-       test_commit three foo.txt &&
-       commit3=$(git rev-list -1 HEAD)
-       '
-
-test_expect_success '--parents rewrites TREESAME parents correctly' '
-       echo $commit3 $commit1 > expected &&
-       echo $commit1 >> expected &&
-       git rev-list --parents HEAD -- foo.txt > actual &&
-       test_cmp expected actual
-       '
-
-test_expect_success '--parents --show-all does not rewrites TREESAME parents' '
-       echo $commit3 $commit2 > expected &&
-       echo $commit2 $commit1 >> expected &&
-       echo $commit1 >> expected &&
-       git rev-list --parents --show-all HEAD -- foo.txt > actual &&
-       test_cmp expected actual
-       '
-
-test_done