Skip to content

Commit 5db8e59

Browse files
peffgitster
authored andcommitted
verify_one_sparse(): drop unused parameters
This function has never used its repository or cache_tree parameters since it was introduced in 9ad2d5e (sparse-index: loose integration with cache_tree_verify(), 2021-03-30). As that commit notes, it may eventually be extended further, and that might require looking at more data. But we can easily add them back if necessary (and the repository is even included in the index_state these days already). In the mean time, dropping them makes the code shorter and appeases -Wunused-parameter. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 77651c0 commit 5db8e59

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cache-tree.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,7 @@ int cache_tree_matches_traversal(struct cache_tree *root,
857857
return 0;
858858
}
859859

860-
static void verify_one_sparse(struct repository *r,
861-
struct index_state *istate,
862-
struct cache_tree *it,
860+
static void verify_one_sparse(struct index_state *istate,
863861
struct strbuf *path,
864862
int pos)
865863
{
@@ -910,7 +908,7 @@ static int verify_one(struct repository *r,
910908
return 1;
911909

912910
if (pos >= 0) {
913-
verify_one_sparse(r, istate, it, path, pos);
911+
verify_one_sparse(istate, path, pos);
914912
return 0;
915913
}
916914

0 commit comments

Comments
 (0)