Code

git-svn: don't drop the username from URLs when dcommit is run
[git.git] / builtin-checkout-index.c
index 8d0dbad49ecd61edf8bdadc24e23e52d31d961a3..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;
 
@@ -122,7 +122,7 @@ static int checkout_file(const char *name, int prefix_length)
        return -1;
 }
 
-static int checkout_all(const char *prefix, int prefix_length)
+static void checkout_all(const char *prefix, int prefix_length)
 {
        int i, errs = 0;
        struct cache_entry* last_ce = NULL;
@@ -153,7 +153,6 @@ static int checkout_all(const char *prefix, int prefix_length)
                 * exit with the same code as die().
                 */
                exit(128);
-       return 0;
 }
 
 static const char checkout_cache_usage[] =
@@ -224,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;