diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-05 13:13:12 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-05 13:13:13 -0800 |
commit | 4e0d6207e58fe19be9343395c979bcb92d09b4a9 (patch) | |
tree | ff9749969b8858c9e37eb8dd343984bd19f1e445 /fast-import.c | |
parent | Merge branch 'es/blame-commit-info-fix' into maint (diff) | |
parent | fast-import: avoid running end_packfile recursively (diff) | |
download | tgif-4e0d6207e58fe19be9343395c979bcb92d09b4a9.tar.xz |
Merge branch 'jk/fast-import-die-nicely-fix' into maint
"git fast-import" used to crash when it could not close and
conclude the resulting packfile cleanly.
* jk/fast-import-die-nicely-fix:
fast-import: avoid running end_packfile recursively
Diffstat (limited to 'fast-import.c')
-rw-r--r-- | fast-import.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c index d0bd285a16..aac2c24f74 100644 --- a/fast-import.c +++ b/fast-import.c @@ -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); |