Merge branch 'jc/send-email-sensible-encoding'
[gitweb.git] / fast-import.c
index d0bd285a16d0161b50d0b43e0315f8fa003e0e32..aac2c24f74e496d11b66e1cc2806c55555f71496 100644 (file)
@@ -947,9 +947,12 @@ static void unkeep_all_packs(void)
 
 static void end_packfile(void)
 {
-       if (!pack_data)
+       static int running;
+
+       if (running || !pack_data)
                return;
 
+       running = 1;
        clear_delta_base_cache();
        if (object_count) {
                struct packed_git *new_p;
@@ -999,6 +1002,7 @@ static void end_packfile(void)
        }
        free(pack_data);
        pack_data = NULL;
+       running = 0;
 
        /* We can't carry a delta across packfiles. */
        strbuf_release(&last_blob.data);