Skip to content

Commit c016579

Browse files
peffgitster
authored andcommitted
name-rev: drop unused parameters from is_better_name()
When this function was extracted in 0041bf6 (name-rev: refactor logic to see if a new candidate is a better name, 2017-03-29), it ended up getting more arguments than it needs. It's possible we may later use these values to evaluate the name, but since it's a static function with a single caller, it will be easy to add them back then. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent be27fb7 commit c016579

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

builtin/name-rev.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ static void set_commit_rev_name(struct commit *commit, struct rev_name *name)
4040
}
4141

4242
static int is_better_name(struct rev_name *name,
43-
const char *tip_name,
4443
timestamp_t taggerdate,
45-
int generation,
4644
int distance,
4745
int from_tag)
4846
{
@@ -103,8 +101,7 @@ static void name_rev(struct commit *commit,
103101
name = xmalloc(sizeof(rev_name));
104102
set_commit_rev_name(commit, name);
105103
goto copy_data;
106-
} else if (is_better_name(name, tip_name, taggerdate,
107-
generation, distance, from_tag)) {
104+
} else if (is_better_name(name, taggerdate, distance, from_tag)) {
108105
copy_data:
109106
name->tip_name = tip_name;
110107
name->taggerdate = taggerdate;

0 commit comments

Comments
 (0)