Unverified Commit 6e4ced17 authored by Arnout Engelen's avatar Arnout Engelen
Browse files

note on using `git archive`

parent 6da2775c
Loading
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -142,6 +142,16 @@ Zip files can additionally store metadata in "extra file attributes". We believe

When creating `.zip` files, it is [recommended to use the `--no-extra` / `-X`](https://lists.reproducible-builds.org/pipermail/rb-general/2024-March/003283.html) argument to not save these fields. It is also recommended that [developers unzip archives with `TZ=UTC`](https://lists.reproducible-builds.org/pipermail/rb-general/2023-April/002927.html).

`git archive`
-------------

[`git archive`](https://git-scm.com/docs/git-archive) does
[not guarantee](https://lists.reproducible-builds.org/pipermail/rb-general/2022-October/002712.html)
deterministic output. It uses the commit time as recorded in the
referenced commit object when used with a commit ID or tag ID (but
not when given a tree ID). In practice, the `tar` output is typically
stable, but the internal `gzip` implementation is not. Using
`git archive --format=tar TAG | gzip -6 -n` is more reliable.

Post-processing
---------------