<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/archive.h, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-12-26T20:04:31Z</updated>
<entry>
<title>archive.h: remove unnecessary include</title>
<updated>2023-12-26T20:04:31Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-12-23T17:14:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c2c4138c07ca4d5ffc41ace0bfda0f189d3e262e'/>
<id>urn:sha1:c2c4138c07ca4d5ffc41ace0bfda0f189d3e262e</id>
<content type='text'>
The unnecessary include in the header transitively pulled in some
other headers actually needed by source files, though.  Have those
source files explicitly include the headers they need.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>treewide: reduce includes of cache.h in other headers</title>
<updated>2023-04-11T15:52:11Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-11T07:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7b189cd5ae99f336c1185f8f8c27a118314ced1'/>
<id>urn:sha1:b7b189cd5ae99f336c1185f8f8c27a118314ced1</id>
<content type='text'>
We had a handful of headers including cache.h that didn't need to
anymore.  Drop those includes and replace them with includes of
smaller files, or forward declarations.  However, note that two .c
files now need to directly include cache.h, though they should have
been including it all along given they are directly using structs
defined in it.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Acked-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object-name.h: move declarations for object-name.c functions from cache.h</title>
<updated>2023-04-11T15:52:09Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-04-11T07:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dabab1d6e6c49f3d4a6393a9984e3f6a4e8fb991'/>
<id>urn:sha1:dabab1d6e6c49f3d4a6393a9984e3f6a4e8fb991</id>
<content type='text'>
Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Acked-by: Calvin Wan &lt;calvinwan@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive: add --mtime</title>
<updated>2023-02-18T17:29:13Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2023-02-18T08:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fd2da4b1ea871df317322f33e82cb3aa1f95ee10'/>
<id>urn:sha1:fd2da4b1ea871df317322f33e82cb3aa1f95ee10</id>
<content type='text'>
Allow users to specify the modification time of archive entries.  The
new option --mtime uses approxidate() to parse a time specification and
overrides the default of using the current time for trees and the commit
time for tags and commits.  It can be used to create a reproducible
archive for a tree, or to use a specific mtime without creating a commit
with GIT_COMMITTER_DATE set.

This implementation doesn't support the negated form of the new option,
i.e. --no-mtime is not accepted.  It is not possible to have no mtime at
all.  We could use the Unix epoch or revert to the default behavior, but
since negation is not necessary for the intended use it's left undecided
for now.

Requested-by: Raul E Rangel &lt;rrangel@chromium.org&gt;
Suggested-by: demerphq &lt;demerphq@gmail.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive: rename archiver data field to filter_command</title>
<updated>2022-06-15T20:19:46Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-06-15T16:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96b9e5151bf0cad110d2f0bf16f413b9fc9f606c'/>
<id>urn:sha1:96b9e5151bf0cad110d2f0bf16f413b9fc9f606c</id>
<content type='text'>
The void pointer "data" in struct archiver is only used to store filter
commands to pass tar archives to, like gzip.  Rename it accordingly and
also turn it into a char pointer to document the fact that it's a string
reference.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive: expand only a single %(describe) per archive</title>
<updated>2021-03-11T21:22:44Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-02-28T11:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96099726ddb00b45135964220ce56468ba9fe184'/>
<id>urn:sha1:96099726ddb00b45135964220ce56468ba9fe184</id>
<content type='text'>
Every %(describe) placeholder in $Format:...$ strings in files with the
attribute export-subst is expanded by calling git describe.  This can
potentially result in a lot of such calls per archive.  That's OK for
local repositories under control of the user of git archive, but could
be a problem for hosted repositories.

Expand only a single %(describe) placeholder per archive for now to
avoid denial-of-service attacks.  We can make this limit configurable
later if needed, but let's start out simple.

Reported-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/archive-plug-leak-refname'</title>
<updated>2020-11-25T23:24:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-25T23:24:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3eebb3e044338fd989b05ab734658cf6208183b2'/>
<id>urn:sha1:3eebb3e044338fd989b05ab734658cf6208183b2</id>
<content type='text'>
Memleak fix.

* rs/archive-plug-leak-refname:
  archive: release refname after use
</content>
</entry>
<entry>
<title>archive: release refname after use</title>
<updated>2020-11-16T22:21:43Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-14T22:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c3e412916df1193b270a6947782f96524e5fa45'/>
<id>urn:sha1:1c3e412916df1193b270a6947782f96524e5fa45</id>
<content type='text'>
parse_treeish_arg() uses dwim_ref() to set refname to a strdup'd string.
Release it after use.  Also remove the const qualifier from the refname
member to signify that ownership of the string is handed to the struct,
leaving cleanup duty with the caller of parse_treeish_arg(), thus
avoiding a cast.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive: support compression levels beyond 9</title>
<updated>2020-11-09T19:25:45Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-09T16:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cde8ea9c66e46ed6427499e0bc049d1d5c55379a'/>
<id>urn:sha1:cde8ea9c66e46ed6427499e0bc049d1d5c55379a</id>
<content type='text'>
Compression programs like zip, gzip, bzip2 and xz allow to adjust the
trade-off between CPU cost and size gain with numerical options from -1
for fast compression and -9 for high compression ratio.  zip also
accepts -0 for storing files verbatim.  git archive directly support
these single-digit compression levels for ZIP output and passes them to
filters like gzip.

Zstandard additionally supports compression level options -10 to -19, or
up to -22 with --ultra.  This *seems* to work with git archive in most
cases, e.g. it will produce an archive with -19 without complaining, but
since it only supports single-digit compression level options this is
the same as -1 -9 and thus -9.

Allow git archive to accept multi-digit compression levels to support
the full range supported by zstd.  Explicitly reject them for the ZIP
format, as otherwise deflateInit2() would just fail with a somewhat
cryptic "stream consistency error".

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>archive: add --add-file</title>
<updated>2020-09-19T22:56:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-09-19T21:23:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2947a7930d2864cfbc3f9815959cd6539e2ea9ad'/>
<id>urn:sha1:2947a7930d2864cfbc3f9815959cd6539e2ea9ad</id>
<content type='text'>
Allow users to append non-tracked files.  This simplifies the generation
of source packages with a few extra files, e.g. containing version
information.  They get the same access times and user information as
tracked files.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
