From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Matthew E. Luallen" <m@sph3r3.com>, git@vger.kernel.org
Subject: Re: [PATCH] archive-zip: omit UT extra field if mtime is out of range
Date: Sun, 11 Oct 2026 19:08:16 -0700 [thread overview]
Message-ID: <87jynn8ycv.fsf@gitster.g> (raw)
In-Reply-To: <595dafac-33c7-4c45-9cac-c868cf1f8bb0@web.de> ("René Scharfe"'s message of "Sun, 11 Oct 2026 18:06:04 +0200")
René Scharfe <l.s.r@web.de> writes:
> diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh
> index 768b0ff85d..20bab21048 100755
> --- a/t/t5004-archive-corner-cases.sh
> +++ b/t/t5004-archive-corner-cases.sh
> @@ -227,4 +227,32 @@ test_expect_success 'tar archive with long paths' '
> git archive -o long_paths.tar $tree
> '
>
> +test_lazy_prereq ZIPINFO_UT_EXTRA '
> + "$ZIPINFO" -v "$TEST_DIRECTORY"/t5004/big-pack.zip |
> + grep "UT extra field modtime"
> +'
> +
> +test_expect_success TIME_IS_64BIT 'zip archive with 32-bit mtime' '
> + blob=$(echo foo | git hash-object -w --stdin) &&
> + tree=$(printf "100644 blob $blob\tfile" | git mktree) &&
> + git archive --mtime="@2147483647 +0000" -o with_ut_extra.zip $tree
> +'
> +
> +test_expect_success TIME_IS_64BIT 'zip archive with mtime exceeding 32-bit' '
> + blob=$(echo foo | git hash-object -w --stdin) &&
> + tree=$(printf "100644 blob $blob\tfile" | git mktree) &&
> + git archive --mtime="@2147483648 +0000" -o without_ut_extra.zip $tree
> +'
Both Ubuntu/20.02 i386 (which is going away so you do not have to
deeply care) and Debian/latest i386 (which we plan to use to replace
the Ubuntu/20.02 i386, so it would be superb to get it work) jobs
seem to fail this one.
https://github.com/git/git/actions/runs/38189684665/job/114619579067#step:10:321
https://github.com/git/git/actions/runs/38189685137/job/114619583658#step:10:337
Thanks.
> +
> +test_expect_success TIME_IS_64BIT,ZIPINFO_UT_EXTRA 'UT extra field' '
> + "$ZIPINFO" -v with_ut_extra.zip >actual &&
> + test_grep "UT extra field modtime" actual
> +'
> +
> +test_expect_success TIME_IS_64BIT,ZIPINFO_UT_EXTRA \
> + 'UT extra field omitted when mtime exceeds 32-bit' '
> + "$ZIPINFO" -v without_ut_extra.zip >actual &&
> + test_grep ! "UT extra field modtime" actual
> +'
> +
> test_done
next prev parent reply other threads:[~2026-10-12 2:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 13:48 [BUG] ZIP timestamp conversion and strict fast-import date validation Matthew E. Luallen
2026-10-05 19:49 ` René Scharfe
2026-10-05 20:32 ` Matthew E. Luallen
2026-10-07 15:33 ` René Scharfe
2026-10-06 3:22 ` m
2026-10-11 16:06 ` [PATCH] archive-zip: omit UT extra field if mtime is out of range René Scharfe
2026-10-12 2:08 ` Junio C Hamano [this message]
2026-10-12 14:39 ` René Scharfe
2026-10-12 12:56 ` m
2026-10-12 14:45 ` René Scharfe
2026-10-12 15:07 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jynn8ycv.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=m@sph3r3.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox