revision: drop some unused "revs" parameters

There are several internal helpers that take a rev_info struct but don't actually look at it. While one could argue that all helpers in revision.c should take a rev_info struct for consistency, dropping the unused parameter makes it clear that they don't actually depend on any other rev options. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Mar 20, 2019 at 04:13 UTC 9163399535c43b6764376a280c2551600e8cd5bc
1 file changed +6 -6
revision.c
+6 -6
@@ -1894,7 +1894,7 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi
1894 return 0;
1895 }
1896
1897 -static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,
1897 +static void read_pathspec_from_stdin(struct strbuf *sb,
1898 struct argv_array *prune)
1899 {
1900 while (strbuf_getline(sb, stdin) != EOF)
@@ -1928,7 +1928,7 @@ static void read_revisions_from_stdin(struct rev_info *revs,
1928 die("bad revision '%s'", sb.buf);
1929 }
1930 if (seen_dashdash)
1931 - read_pathspec_from_stdin(revs, &sb, prune);
1931 + read_pathspec_from_stdin(&sb, prune);
1932
1933 strbuf_release(&sb);
1934 warn_on_object_refname_ambiguity = save_warning;
@@ -2748,7 +2748,7 @@ static struct merge_simplify_state *locate_simplify_state(struct rev_info *revs,
2748 return st;
2749 }
2750
2751 -static int mark_redundant_parents(struct rev_info *revs, struct commit *commit)
2751 +static int mark_redundant_parents(struct commit *commit)
2752 {
2753 struct commit_list *h = reduce_heads(commit->parents);
2754 int i = 0, marked = 0;
@@ -2784,7 +2784,7 @@ static int mark_redundant_parents(struct rev_info *revs, struct commit *commit)
2784 return marked;
2785 }
2786
2787 -static int mark_treesame_root_parents(struct rev_info *revs, struct commit *commit)
2787 +static int mark_treesame_root_parents(struct commit *commit)
2788 {
2789 struct commit_list *p;
2790 int marked = 0;
@@ -2976,8 +2976,8 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
2976 * Detect and simplify both cases.
2977 */
2978 if (1 < cnt) {
2979 - int marked = mark_redundant_parents(revs, commit);
2980 - marked += mark_treesame_root_parents(revs, commit);
2979 + int marked = mark_redundant_parents(commit);
2980 + marked += mark_treesame_root_parents(commit);
2981 if (marked)
2982 marked -= leave_one_treesame_to_parent(revs, commit);
2983 if (marked)