diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-02-25 15:40:15 -0800 |
commit | 1585dfeda7f5696db22e0e5098fa2b5f633dfa2d (patch) | |
tree | a9ceee252b669162b606fdc98419e7f6e6970efa /fast-import.c | |
parent | a75c663cd2056919a58ea949c519aad90eddd2f5 (diff) | |
parent | 5e915f3085db3c0edbc80269f889341172e8595b (diff) | |
download | git-1585dfeda7f5696db22e0e5098fa2b5f633dfa2d.tar.gz |
Merge branch 'jk/fast-import-die-nicely-fix'
"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); |