Merge branch 'js/attach'
[gitweb.git] / builtin-checkout-index.c
index 6b55f931cbd8b79a01057b55eb41a043a4db5e3b..afe4b0e4520f47f1dace1383bfc2b364b1b1def0 100644 (file)
@@ -45,7 +45,7 @@
 static int line_termination = '\n';
 static int checkout_stage; /* default to checkout stage0 */
 static int to_tempfile;
-static char topath[4][MAXPATHLEN+1];
+static char topath[4][PATH_MAX + 1];
 
 static struct checkout state;
 
@@ -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;