Skip to content

Commit

Permalink
Merge branch 'jk/cached-commit-buffer' into maint
Browse files Browse the repository at this point in the history
Code clean-up.

* jk/cached-commit-buffer:
  revision: drop --show-all option
  commit: drop uses of get_cached_commit_buffer()
  • Loading branch information
gitster committed Mar 22, 2018
2 parents c9bc2c5 + f74bbc8 commit 393eee1
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 46 deletions.
2 changes: 1 addition & 1 deletion builtin/rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void show_commit(struct commit *commit, void *data)
else
putchar('\n');

if (revs->verbose_header && get_cached_commit_buffer(commit, NULL)) {
if (revs->verbose_header) {
struct strbuf buf = STRBUF_INIT;
struct pretty_print_context ctx = {0};
ctx.abbrev = revs->abbrev;
Expand Down
3 changes: 0 additions & 3 deletions log-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,6 @@ void show_log(struct rev_info *opt)
show_mergetag(opt, commit);
}

if (!get_cached_commit_buffer(commit, NULL))
return;

if (opt->show_notes) {
int raw;
struct strbuf notebuf = STRBUF_INIT;
Expand Down
10 changes: 0 additions & 10 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -1854,8 +1849,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")) {
Expand Down Expand Up @@ -3062,8 +3055,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 &&
Expand Down Expand Up @@ -3162,7 +3153,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
Expand Down
1 change: 0 additions & 1 deletion revision.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 0 additions & 31 deletions t/t6015-rev-list-show-all-parents.sh

This file was deleted.

0 comments on commit 393eee1

Please sign in to comment.