Skip to content

Commit 9163399

Browse files
peffgitster
authored andcommitted
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>
1 parent 041f5ea commit 9163399

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

revision.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,7 @@ int handle_revision_arg(const char *arg_, struct rev_info *revs, int flags, unsi
18941894
return 0;
18951895
}
18961896

1897-
static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,
1897+
static void read_pathspec_from_stdin(struct strbuf *sb,
18981898
struct argv_array *prune)
18991899
{
19001900
while (strbuf_getline(sb, stdin) != EOF)
@@ -1928,7 +1928,7 @@ static void read_revisions_from_stdin(struct rev_info *revs,
19281928
die("bad revision '%s'", sb.buf);
19291929
}
19301930
if (seen_dashdash)
1931-
read_pathspec_from_stdin(revs, &sb, prune);
1931+
read_pathspec_from_stdin(&sb, prune);
19321932

19331933
strbuf_release(&sb);
19341934
warn_on_object_refname_ambiguity = save_warning;
@@ -2748,7 +2748,7 @@ static struct merge_simplify_state *locate_simplify_state(struct rev_info *revs,
27482748
return st;
27492749
}
27502750

2751-
static int mark_redundant_parents(struct rev_info *revs, struct commit *commit)
2751+
static int mark_redundant_parents(struct commit *commit)
27522752
{
27532753
struct commit_list *h = reduce_heads(commit->parents);
27542754
int i = 0, marked = 0;
@@ -2784,7 +2784,7 @@ static int mark_redundant_parents(struct rev_info *revs, struct commit *commit)
27842784
return marked;
27852785
}
27862786

2787-
static int mark_treesame_root_parents(struct rev_info *revs, struct commit *commit)
2787+
static int mark_treesame_root_parents(struct commit *commit)
27882788
{
27892789
struct commit_list *p;
27902790
int marked = 0;
@@ -2976,8 +2976,8 @@ static struct commit_list **simplify_one(struct rev_info *revs, struct commit *c
29762976
* Detect and simplify both cases.
29772977
*/
29782978
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);
29812981
if (marked)
29822982
marked -= leave_one_treesame_to_parent(revs, commit);
29832983
if (marked)

0 commit comments

Comments
 (0)