Skip to content

Commit

Permalink
add.c: remove unused argument from validate_pathspec()
Browse files Browse the repository at this point in the history
The 'argc' argument passed to validate_pathspec() was never used.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Adam Spiers authored and Junio C Hamano committed Jan 6, 2013
1 parent 52ed189 commit f8a1113
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static void refresh(int verbose, const char **pathspec)
free(seen);
}

static const char **validate_pathspec(int argc, const char **argv, const char *prefix)
static const char **validate_pathspec(const char **argv, const char *prefix)
{
const char **pathspec = get_pathspec(prefix, argv);

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

if (argc) {
pathspec = validate_pathspec(argc, argv, prefix);
pathspec = validate_pathspec(argv, prefix);
if (!pathspec)
return -1;
}
Expand Down Expand Up @@ -414,7 +414,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
fprintf(stderr, _("Maybe you wanted to say 'git add .'?\n"));
return 0;
}
pathspec = validate_pathspec(argc, argv, prefix);
pathspec = validate_pathspec(argv, prefix);

if (read_cache() < 0)
die(_("index file corrupt"));
Expand Down

0 comments on commit f8a1113

Please sign in to comment.