git-update-index(1): fix use of quoting in section title
[gitweb.git] / cache-tree.c
index 323c68a6709f30312e0dfb0fd60fcd7e69cd710b..a80326289dbea2c08acce577cf8eef26a0cfba68 100644 (file)
@@ -2,7 +2,9 @@
 #include "tree.h"
 #include "cache-tree.h"
 
+#ifndef DEBUG
 #define DEBUG 0
+#endif
 
 struct cache_tree *cache_tree(void)
 {
@@ -344,12 +346,8 @@ static int update_one(struct cache_tree *it,
 #endif
        }
 
-       if (dryrun) {
-               unsigned char hdr[200];
-               int hdrlen;
-               write_sha1_file_prepare(buffer, offset, tree_type, it->sha1,
-                                       hdr, &hdrlen);
-       }
+       if (dryrun)
+               hash_sha1_file(buffer, offset, tree_type, it->sha1);
        else
                write_sha1_file(buffer, offset, tree_type, it->sha1);
        free(buffer);