Merge branch 'jk/cached-commit-buffer' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 22 Mar 2018 21:24:25 +0000 (14:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Mar 2018 21:24:25 +0000 (14:24 -0700)
Code clean-up.

* jk/cached-commit-buffer:
revision: drop --show-all option
commit: drop uses of get_cached_commit_buffer()

1  2 
revision.c
diff --combined revision.c
index a2ba54459d42ba032cd3c16aecdef2eeff98562f,f4b1f725c29deb7ef520ba9e49389343380436dd..e5e527bcf256e0d062ffaae2a3d6ac2a1e7373d6
@@@ -1055,14 -1055,9 +1055,9 @@@ static int limit_list(struct rev_info *
                        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))
@@@ -1352,8 -1347,7 +1347,8 @@@ void add_index_objects_to_pending(struc
                        continue; /* current index already taken care of */
  
                if (read_index_from(&istate,
 -                                  worktree_git_path(wt, "index")) > 0)
 +                                  worktree_git_path(wt, "index"),
 +                                  get_worktree_git_dir(wt)) > 0)
                        do_add_index_objects_to_pending(revs, &istate);
                discard_index(&istate);
        }
@@@ -1854,8 -1848,6 +1849,6 @@@ static int handle_revision_opt(struct r
                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")) {
@@@ -3062,8 -3054,6 +3055,6 @@@ enum commit_action get_commit_action(st
                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 &&
@@@ -3162,7 -3152,6 +3153,6 @@@ enum commit_action simplify_commit(stru
        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