Skip to content

Commit 5bb1cb6

Browse files
peffgitster
authored andcommitted
update-index: drop unused prefix_length parameter from do_reupdate()
The prefix is always a NUL-terminated string, and we just end up passing it along to parse_pathspec() anyway (which does not even take a length). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent af11707 commit 5bb1cb6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/update-index.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ static int do_unresolve(int ac, const char **av,
724724
}
725725

726726
static int do_reupdate(int ac, const char **av,
727-
const char *prefix, int prefix_length)
727+
const char *prefix)
728728
{
729729
/* Read HEAD and run update-index on paths that are
730730
* merged and already different between index and HEAD.
@@ -940,8 +940,7 @@ static enum parse_opt_result reupdate_callback(
940940

941941
/* consume remaining arguments. */
942942
setup_work_tree();
943-
*has_errors = do_reupdate(ctx->argc, ctx->argv,
944-
prefix, prefix ? strlen(prefix) : 0);
943+
*has_errors = do_reupdate(ctx->argc, ctx->argv, prefix);
945944
if (*has_errors)
946945
active_cache_changed = 0;
947946

0 commit comments

Comments
 (0)