diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-02-07 07:05:23 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-02-07 07:05:23 +0100 |
commit | b2fc9d2fb02782a20d4370d7989be8b0a54f1017 (patch) | |
tree | 9771fd700c2e746ddee794f0c89b69004ad3950f /match-trees.c | |
parent | Merge branch 'nd/the-index-final' (diff) | |
parent | convert: drop path parameter from actual conversion functions (diff) | |
download | git-b2fc9d2fb02782a20d4370d7989be8b0a54f1017.tar.xz git-b2fc9d2fb02782a20d4370d7989be8b0a54f1017.zip |
Merge branch 'jk/unused-parameter-cleanup'
Code cleanup.
* jk/unused-parameter-cleanup:
convert: drop path parameter from actual conversion functions
convert: drop len parameter from conversion checks
config: drop unused parameter from maybe_remove_section()
show_date_relative(): drop unused "tz" parameter
column: drop unused "opts" parameter in item_length()
create_bundle(): drop unused "header" parameter
apply: drop unused "def" parameter from find_name_gnu()
match-trees: drop unused path parameter from score functions
Diffstat (limited to 'match-trees.c')
-rw-r--r-- | match-trees.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/match-trees.c b/match-trees.c index 18ab825bef..ddc4d39845 100644 --- a/match-trees.c +++ b/match-trees.c @@ -3,7 +3,7 @@ #include "tree-walk.h" #include "object-store.h" -static int score_missing(unsigned mode, const char *path) +static int score_missing(unsigned mode) { int score; @@ -16,7 +16,7 @@ static int score_missing(unsigned mode, const char *path) return score; } -static int score_differs(unsigned mode1, unsigned mode2, const char *path) +static int score_differs(unsigned mode1, unsigned mode2) { int score; @@ -29,7 +29,7 @@ static int score_differs(unsigned mode1, unsigned mode2, const char *path) return score; } -static int score_matches(unsigned mode1, unsigned mode2, const char *path) +static int score_matches(unsigned mode1, unsigned mode2) { int score; @@ -98,24 +98,22 @@ static int score_trees(const struct object_id *hash1, const struct object_id *ha if (cmp < 0) { /* path1 does not appear in two */ - score += score_missing(one.entry.mode, one.entry.path); + score += score_missing(one.entry.mode); update_tree_entry(&one); } else if (cmp > 0) { /* path2 does not appear in one */ - score += score_missing(two.entry.mode, two.entry.path); + score += score_missing(two.entry.mode); update_tree_entry(&two); } else { /* path appears in both */ if (!oideq(&one.entry.oid, &two.entry.oid)) { /* they are different */ score += score_differs(one.entry.mode, - two.entry.mode, - one.entry.path); + two.entry.mode); } else { /* same subtree or blob */ score += score_matches(one.entry.mode, - two.entry.mode, - one.entry.path); + two.entry.mode); } update_tree_entry(&one); update_tree_entry(&two); |