diff-tree -r -t: include added/removed directories in the output
[gitweb.git] / sha1_file.c
index cbcae24d28f7000d2e55c4a2ef95026f07c5e5cc..bcfcab351dd9f8d5b4e1cc0d86ecd2162f46cf94 100644 (file)
@@ -676,6 +676,7 @@ void free_pack_by_name(const char *pack_name)
        while (*pp) {
                p = *pp;
                if (strcmp(pack_name, p->pack_name) == 0) {
+                       clear_delta_base_cache();
                        close_pack_windows(p);
                        if (p->pack_fd != -1)
                                close(p->pack_fd);
@@ -2240,7 +2241,7 @@ static void close_sha1_file(int fd)
                fsync_or_die(fd, "sha1 file");
        fchmod(fd, 0444);
        if (close(fd) != 0)
-               die("unable to write sha1 file");
+               die("error when closing sha1 file (%s)", strerror(errno));
 }
 
 /* Size of directory component, including the ending '/' */