]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/checkout.c
introduce CHECKOUT_INIT
[thirdparty/git.git] / builtin / checkout.c
index 9941abc3acdfa035387606f7ecc8f33905f80e7d..4c8627208708adad9da51bb9b98917c48a5d838a 100644 (file)
@@ -239,7 +239,7 @@ static int checkout_paths(const struct checkout_opts *opts,
                          const char *revision)
 {
        int pos;
-       struct checkout state;
+       struct checkout state = CHECKOUT_INIT;
        static char *ps_matched;
        struct object_id rev;
        struct commit *head;
@@ -352,7 +352,6 @@ static int checkout_paths(const struct checkout_opts *opts,
                return 1;
 
        /* Now we are committed to check them out */
-       memset(&state, 0, sizeof(state));
        state.force = 1;
        state.refresh_cache = 1;
        state.istate = &the_index;