archive: fix subst file generation
[gitweb.git] / builtin-checkout-index.c
index 8460f97b6637127d78b58caf2e29d25f3ad0b5a0..153ba7dc129d54f09268aa70ab523946007c2821 100644 (file)
@@ -36,6 +36,7 @@
  * of "-a" causing problems (not possible in the above example,
  * but get used to it in scripting!).
  */
+#include "builtin.h"
 #include "cache.h"
 #include "strbuf.h"
 #include "quote.h"
@@ -273,7 +274,7 @@ int cmd_checkout_index(int argc, const char **argv, const char *prefix)
                struct strbuf buf;
                if (all)
                        die("git-checkout-index: don't mix '--all' and '--stdin'");
-               strbuf_init(&buf);
+               strbuf_init(&buf, 0);
                while (1) {
                        char *path_name;
                        const char *p;