summaryrefslogtreecommitdiff
path: root/builtin-checkout-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-checkout-index.c')
-rw-r--r--builtin-checkout-index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-checkout-index.c b/builtin-checkout-index.c
index b097c888a0..afe4b0e452 100644
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
@@ -223,12 +223,12 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
to_tempfile = 1;
continue;
}
- if (!strncmp(arg, "--prefix=", 9)) {
+ if (!prefixcmp(arg, "--prefix=")) {
state.base_dir = arg+9;
state.base_dir_len = strlen(state.base_dir);
continue;
}
- if (!strncmp(arg, "--stage=", 8)) {
+ if (!prefixcmp(arg, "--stage=")) {
if (!strcmp(arg + 8, "all")) {
to_tempfile = 1;
checkout_stage = CHECKOUT_ALL;