git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] archive-zip: omit UT extra field if mtime is out of range

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 12, 2026, 02:08 UTC
Message-ID
<87jynn8ycv.fsf@gitster.g>
In-Reply-To
<595dafac-33c7-4c45-9cac-c868cf1f8bb0@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 24 quoted lines
> 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.
Show 13 quoted lines
> +
> +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
Previous: René ScharfeNext: René Scharfe
Message 7 of 14 in “[BUG] ZIP timestamp conversion and strict fast-import date validation”
  1. Matthew E. LuallenOct 5, 2026
  2. René ScharfeOct 5, 2026
  3. Matthew E. LuallenOct 5, 2026
  4. René ScharfeOct 7, 2026
  5. m@sph3r3.comOct 6, 2026
  6. archive-zip: omit UT extra field if mtime is out of rangeRené Scharfe, Oct 11, 2026
  7. Junio C HamanoOct 12, 2026
  8. René ScharfeOct 12, 2026
  9. m@sph3r3.comOct 12, 2026
  10. René ScharfeOct 12, 2026
  11. René ScharfeOct 19, 2026
  12. Junio C HamanoOct 12, 2026
  13. archive-zip: omit UT extra field if mtime is out of rangeRené Scharfe, Oct 19, 2026
  14. m@sph3r3.comOct 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.