Merge branch 'np/delta' into next
[gitweb.git] / tar-tree.c
index efab2b5420af5225a0ebb4dbecd37252ed7ef1ff..fc60a90873d1928ce3ada6d26f0a0ae571d43773 100644 (file)
@@ -3,7 +3,7 @@
  */
 #include <time.h>
 #include "cache.h"
-#include "diff.h"
+#include "tree-walk.h"
 #include "commit.h"
 #include "strbuf.h"
 #include "tar.h"
@@ -94,7 +94,6 @@ static void write_blocked(void *buf, unsigned long size)
        }
        if (size) {
                memcpy(block + offset, buf, size);
-               buf += size;
                offset += size;
        }
        tail = offset % RECORDSIZE;
@@ -314,6 +313,7 @@ int main(int argc, char **argv)
        current_path.len = current_path.eof = 0;
 
        setup_git_directory();
+       git_config(git_default_config);
 
        switch (argc) {
        case 3:
@@ -335,7 +335,7 @@ int main(int argc, char **argv)
        } else
                archive_time = time(NULL);
 
-       tree.buf = read_object_with_reference(sha1, "tree", &tree.size,
+       tree.buf = read_object_with_reference(sha1, tree_type, &tree.size,
                                              tree_sha1);
        if (!tree.buf)
                die("not a reference to a tag, commit or tree object: %s",