mbox series

[v4,0/6] Avoid spawning gzip in git archive

Message ID 9df761c3-355a-ede9-7971-b32687fe9abb@web.de (mailing list archive)
Headers show
Series Avoid spawning gzip in git archive | expand

Message

René Scharfe June 15, 2022, 4:53 p.m. UTC
Changes since v3:
- Use deflateSetHeader() correctly, thanks to Dscho.
- New patch to update the format-related documentation.

  archive: update format documentation
  archive: rename archiver data field to filter_command
  archive-tar: factor out write_block()
  archive-tar: add internal gzip implementation
  archive-tar: use OS_CODE 3 (Unix) for internal gzip
  archive-tar: use internal gzip by default

 Documentation/git-archive.txt | 21 +++++-----
 archive-tar.c                 | 77 ++++++++++++++++++++++++++++++-----
 archive.h                     |  2 +-
 t/t5000-tar-tree.sh           | 28 ++++++++++---
 4 files changed, 100 insertions(+), 28 deletions(-)

Range-Diff vs. v3:
-:  ---------- > 1:  67369ed452 archive: update format documentation
1:  73ccd190bd = 2:  6a7cce50ef archive: rename archiver data field to filter_command
2:  352cff7163 = 3:  c86e82bee8 archive-tar: factor out write_block()
3:  4e7cf97631 ! 4:  6196b0e39d archive-tar: add internal gzip implementation
    @@ Commit message

      ## Documentation/git-archive.txt ##
     @@ Documentation/git-archive.txt: tar.<format>.command::
    - 	format is given.
    + 	to the command (e.g., `-9`).
      +
    - The "tar.gz" and "tgz" formats are defined automatically and default to
    --`gzip -cn`. You may override them with custom commands.
    -+`gzip -cn`. You may override them with custom commands. An internal gzip
    -+implementation can be used by specifying the value `git archive gzip`.
    + The `tar.gz` and `tgz` formats are defined automatically and use the
    +-command `gzip -cn` by default.
    ++command `gzip -cn` by default. An internal gzip implementation can be
    ++used by specifying the value `git archive gzip`.

      tar.<format>.remote::
    - 	If true, enable `<format>` for use by remote clients via
    + 	If true, enable the format for use by remote clients via

      ## archive-tar.c ##
     @@ archive-tar.c: static int write_tar_filter_archive(const struct archiver *ar,
4:  cb2bbe9f6d < -:  ---------- archive-tar: use OS_CODE 3 (Unix) for internal gzip
-:  ---------- > 5:  19d286af6a archive-tar: use OS_CODE 3 (Unix) for internal gzip
5:  5dd968ced1 ! 6:  74683137af archive-tar: use internal gzip by default
    @@ Commit message

      ## Documentation/git-archive.txt ##
     @@ Documentation/git-archive.txt: tar.<format>.command::
    - 	format is given.
    + 	to the command (e.g., `-9`).
      +
    - The "tar.gz" and "tgz" formats are defined automatically and default to
    --`gzip -cn`. You may override them with custom commands. An internal gzip
    --implementation can be used by specifying the value `git archive gzip`.
    -+the magic value `git archive gzip`, which invokes an internal
    -+implementation of gzip. You may override them with custom commands.
    + The `tar.gz` and `tgz` formats are defined automatically and use the
    +-command `gzip -cn` by default. An internal gzip implementation can be
    +-used by specifying the value `git archive gzip`.
    ++magic command `git archive gzip` by default, which invokes an internal
    ++implementation of gzip.

      tar.<format>.remote::
    - 	If true, enable `<format>` for use by remote clients via
    + 	If true, enable the format for use by remote clients via

      ## archive-tar.c ##
     @@ archive-tar.c: void init_tar_archiver(void)
--
2.36.1