summaryrefslogtreecommitdiff
path: root/builtin/name-rev.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-05-09 21:30:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-13 05:22:54 (GMT)
commitc0165798952fff060243cdf199df30209f9995bc (patch)
treef8de63f45a2d95276ad4f25f658ab9a164f36e5d /builtin/name-rev.c
parentbe27fb7b287a81b5b3c889121eab99d344272e8b (diff)
downloadgit-c0165798952fff060243cdf199df30209f9995bc.zip
git-c0165798952fff060243cdf199df30209f9995bc.tar.gz
git-c0165798952fff060243cdf199df30209f9995bc.tar.bz2
name-rev: drop unused parameters from is_better_name()
When this function was extracted in 0041bf6544 (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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/name-rev.c')
-rw-r--r--builtin/name-rev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 05ccf53..16df434 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -40,9 +40,7 @@ static void set_commit_rev_name(struct commit *commit, struct rev_name *name)
}
static int is_better_name(struct rev_name *name,
- const char *tip_name,
timestamp_t taggerdate,
- int generation,
int distance,
int from_tag)
{
@@ -103,8 +101,7 @@ static void name_rev(struct commit *commit,
name = xmalloc(sizeof(rev_name));
set_commit_rev_name(commit, name);
goto copy_data;
- } else if (is_better_name(name, tip_name, taggerdate,
- generation, distance, from_tag)) {
+ } else if (is_better_name(name, taggerdate, distance, from_tag)) {
copy_data:
name->tip_name = tip_name;
name->taggerdate = taggerdate;