]> git.ipfire.org Git - thirdparty/git.git/commit - archive-zip.c
archive-zip: use strbuf for ZIP directory
authorRené Scharfe <l.s.r@web.de>
Mon, 24 Apr 2017 17:30:49 +0000 (19:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Apr 2017 05:10:43 +0000 (22:10 -0700)
commitc061a149709195e0ec914a5d6ba173042e4197f9
tree538ca1fac2ab7c397bac63fc6cce50cd7bd1332d
parent758c1f9d1bcab5115f5d9e990c952602ea58a161
archive-zip: use strbuf for ZIP directory

Keep the ZIP central directory, which is written after all archive
entries, in a strbuf instead of a custom-managed buffer.  It contains
binary data, so we can't (and don't want to) use the full range of
strbuf functions and we don't need the terminating NUL, but the result
is shorter and simpler code.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-zip.c