Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
update-index: drop unused prefix_length parameter from do_reupdate()
author
Jeff King
<peff@peff.net>
Wed, 20 Mar 2019 08:14:07 +0000
(
04:14
-0400)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 20 Mar 2019 09:34:09 +0000
(18:34 +0900)
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>
builtin/update-index.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
af11707
)
diff --git
a/builtin/update-index.c
b/builtin/update-index.c
index 1b6c42f748fd52ece4cf5f109f92a50bc2a87be3..ff5cfd11948593984c791a0f922351343019f4cf 100644
(file)
--- a/
builtin/update-index.c
+++ b/
builtin/update-index.c
@@
-724,7
+724,7
@@
static int do_unresolve(int ac, const char **av,
}
static int do_reupdate(int ac, const char **av,
}
static int do_reupdate(int ac, const char **av,
- const char *prefix
, int prefix_length
)
+ const char *prefix)
{
/* Read HEAD and run update-index on paths that are
* merged and already different between index and HEAD.
{
/* Read HEAD and run update-index on paths that are
* merged and already different between index and HEAD.
@@
-940,8
+940,7
@@
static enum parse_opt_result reupdate_callback(
/* consume remaining arguments. */
setup_work_tree();
/* consume remaining arguments. */
setup_work_tree();
- *has_errors = do_reupdate(ctx->argc, ctx->argv,
- prefix, prefix ? strlen(prefix) : 0);
+ *has_errors = do_reupdate(ctx->argc, ctx->argv, prefix);
if (*has_errors)
active_cache_changed = 0;
if (*has_errors)
active_cache_changed = 0;