Merge branch 'jk/shallow-update-fix'
[gitweb.git] / upload-pack.c
index 9314c250ffd72ef44dd6b675e0f3592e3e283a04..3a6f9f5b0d76ed080a2c47b903ae8e1e66aed00e 100644 (file)
@@ -81,7 +81,7 @@ static void create_pack_file(void)
        const char *argv[12];
        int i, arg = 0;
        FILE *pipe_fd;
-       char *shallow_file = NULL;
+       const char *shallow_file = NULL;
 
        if (shallow_nr) {
                shallow_file = setup_temporary_shallow(NULL);
@@ -242,11 +242,6 @@ static void create_pack_file(void)
                error("git upload-pack: git-pack-objects died with error.");
                goto fail;
        }
-       if (shallow_file) {
-               if (*shallow_file)
-                       unlink(shallow_file);
-               free(shallow_file);
-       }
 
        /* flush the data */
        if (0 <= buffered) {