Merge branch 'master' of git://github.com/git-l10n/git-po
[gitweb.git] / builtin / mktree.c
index bb76b469fd1f57319f3d202c1e2658d77962d698..94e82b8504f7da5bed50d81771cefe3445b98ece 100644 (file)
@@ -7,6 +7,7 @@
 #include "quote.h"
 #include "tree.h"
 #include "parse-options.h"
+#include "object-store.h"
 
 static struct treeent {
        unsigned mode;
@@ -97,7 +98,7 @@ static void mktree_line(char *buf, size_t len, int nul_term_line, int allow_miss
 
        *ntr++ = 0; /* now at the beginning of SHA1 */
 
-       path = ntr + 41;  /* at the beginning of name */
+       path = (char *)p + 1;  /* at the beginning of name */
        if (!nul_term_line && path[0] == '"') {
                struct strbuf p_uq = STRBUF_INIT;
                if (unquote_c_style(&p_uq, path, NULL))