Skip to content

Commit f8a1113

Browse files
aspiersgitster
authored andcommitted
add.c: remove unused argument from validate_pathspec()
The 'argc' argument passed to validate_pathspec() was never used. Signed-off-by: Adam Spiers <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 52ed189 commit f8a1113

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/add.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static void refresh(int verbose, const char **pathspec)
197197
free(seen);
198198
}
199199

200-
static const char **validate_pathspec(int argc, const char **argv, const char *prefix)
200+
static const char **validate_pathspec(const char **argv, const char *prefix)
201201
{
202202
const char **pathspec = get_pathspec(prefix, argv);
203203

@@ -248,7 +248,7 @@ int interactive_add(int argc, const char **argv, const char *prefix, int patch)
248248
const char **pathspec = NULL;
249249

250250
if (argc) {
251-
pathspec = validate_pathspec(argc, argv, prefix);
251+
pathspec = validate_pathspec(argv, prefix);
252252
if (!pathspec)
253253
return -1;
254254
}
@@ -414,7 +414,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
414414
fprintf(stderr, _("Maybe you wanted to say 'git add .'?\n"));
415415
return 0;
416416
}
417-
pathspec = validate_pathspec(argc, argv, prefix);
417+
pathspec = validate_pathspec(argv, prefix);
418418

419419
if (read_cache() < 0)
420420
die(_("index file corrupt"));

0 commit comments

Comments
 (0)