diff options
author | Philip.McGraw <Philip.McGraw@bentley.com> | 2019-08-27 06:43:58 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-06 20:43:37 +0900 |
commit | de5abb5f7a22fbb595fbc6ccb4a75bfad14396d3 (patch) | |
tree | 26b49c6ce70945cba47beb70d5bf476f8e3f9e7d /builtin/check-ignore.c | |
parent | Fifth batch (diff) | |
download | tgif-de5abb5f7a22fbb595fbc6ccb4a75bfad14396d3.tar.xz |
git-p4: auto-delete named temporary file
Avoid double-open exceptions on Windows platform when
calculating for lfs compressed size threshold
(git-p4.largeFileCompressedThreshold) comparisons.
Take new approach using the NamedTemporaryFile()
file-like object as input to the ZipFile() which
auto-deletes after implicit close leaving with scope.
Original code had double-open exception on Windows
platform because file still open from NamedTemporaryFile()
using generated filename instead of object.
Thanks to Andrey for patiently suggesting several
iterations on this change for avoiding exceptions!
Also print error details after resulting IOError to make
debugging cause of exception less mysterious when it has
nothing to do with "git version recent enough."
Signed-off-by: Philip.McGraw <Philip.McGraw@bentley.com>
Reviewed-by: Andrey Mazo <ahippo@yandex.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-ignore.c')
0 files changed, 0 insertions, 0 deletions