]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ps/zlib-ng'
authorJunio C Hamano <gitster@pobox.com>
Thu, 6 Feb 2025 22:56:45 +0000 (14:56 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Feb 2025 22:56:45 +0000 (14:56 -0800)
The code paths to interact with zlib has been cleaned up in
preparation for building with zlib-ng.

* ps/zlib-ng:
  ci: make "linux-musl" job use zlib-ng
  ci: switch linux-musl to use Meson
  compat/zlib: allow use of zlib-ng as backend
  git-zlib: cast away potential constness of `next_in` pointer
  compat/zlib: provide stubs for `deflateSetHeader()`
  compat/zlib: provide `deflateBound()` shim centrally
  git-compat-util: move include of "compat/zlib.h" into "git-zlib.h"
  compat: introduce new "zlib.h" header
  git-compat-util: drop `z_const` define
  compat: drop `uncompress2()` compatibility shim

12 files changed:
1  2 
.github/workflows/main.yml
.gitlab-ci.yml
Makefile
ci/install-dependencies.sh
ci/lib.sh
ci/run-build-and-tests.sh
csum-file.c
git-compat-util.h
meson.build
meson_options.txt
reftable/block.c
reftable/system.h

index 5d76999d099c68ad9c798083259e144444a953c8,83bf9b918ba1b90c778d1a72cdbfa9a97ef86bdf..5f756dfc2e20844e04bf2fec96b9df429ec0264a
@@@ -365,33 -394,9 +365,33 @@@ jobs
        fail-fast: false
        matrix:
          vector:
-         - jobname: linux-musl
 +        - jobname: linux-sha256
 +          image: ubuntu:rolling
 +          cc: clang
 +        - jobname: linux-reftable
 +          image: ubuntu:rolling
 +          cc: clang
 +        - jobname: linux-TEST-vars
 +          image: ubuntu:20.04
 +          cc: gcc
 +          cc_package: gcc-8
 +        - jobname: linux-breaking-changes
 +          cc: gcc
 +          image: ubuntu:rolling
 +        - jobname: linux-leaks
 +          image: ubuntu:rolling
 +          cc: gcc
 +        - jobname: linux-reftable-leaks
 +          image: ubuntu:rolling
 +          cc: gcc
 +        - jobname: linux-asan-ubsan
 +          image: ubuntu:rolling
 +          cc: clang
 +        - jobname: linux-meson
 +          image: ubuntu:rolling
 +          cc: gcc
 -          image: alpine
 -          distro: alpine-latest
+         - jobname: linux-musl-meson
 +          image: alpine:latest
          # Supported until 2025-04-02.
          - jobname: linux32
            image: i386/ubuntu:focal
diff --cc .gitlab-ci.yml
index be00a1572c4bda29636d6522bc963dfdef537962,f737e4177c24d21f08dfa5c2fba8aa082c4cf6b1..629492694c8949e70372460029cb996d14277819
@@@ -60,12 -67,10 +60,12 @@@ test:linux
          CC: clang
        - jobname: pedantic
          image: fedora:latest
-       - jobname: linux-musl
+       - jobname: linux-musl-meson
          image: alpine:latest
 +      - jobname: linux32
 +        image: i386/ubuntu:20.04
        - jobname: linux-meson
 -        image: ubuntu:latest
 +        image: ubuntu:rolling
          CC: gcc
    artifacts:
      paths:
diff --cc Makefile
Simple merge
Simple merge
diff --cc ci/lib.sh
Simple merge
Simple merge
diff --cc csum-file.c
Simple merge
Simple merge
diff --cc meson.build
Simple merge
index e62a433902c534b863640807e82d08d7622adb63,e9f8e990e3e88de5baea652825b4745c230473c4..5c12e9055e6b03afa63325863037d95e70b3d25e
@@@ -59,10 -57,10 +59,12 @@@ option('sha1_unsafe_backend', type: 'co
    description: 'The backend used for hashing data with the SHA1 object format in case no cryptographic security is needed.')
  option('sha256_backend', type: 'combo', choices: ['openssl', 'nettle', 'gcrypt', 'block'], value: 'block',
    description: 'The backend used for hashing objects with the SHA256 object format.')
+ option('zlib_backend', type: 'combo', choices: ['auto', 'zlib', 'zlib-ng'], value: 'auto',
+   description: 'The backend used for compressing objects and other data.')
  
  # Build tweaks.
 +option('breaking_changes', type: 'boolean', value: false,
 +  description: 'Enable upcoming breaking changes.')
  option('macos_use_homebrew_gettext', type: 'boolean', value: true,
    description: 'Use gettext from Homebrew instead of the slightly-broken system-provided one.')
  
index 8ac865ce781e45c41722383e74a1c2dc59b061dc,38e3081c614ab2240ce0d988db26f2f4f12b17a1..b14a8f1259aef11d299e07b5962d4fdf1c675f42
@@@ -13,9 -13,8 +13,8 @@@ https://developers.google.com/open-sour
  #include "record.h"
  #include "reftable-error.h"
  #include "system.h"
- #include <zlib.h>
  
 -int header_size(int version)
 +size_t header_size(int version)
  {
        switch (version) {
        case 1:
index 7d5f803eeb1bdeaec475c95c85e5966859542108,f194a3868634ce7806a85518ebe561a50f5a3ac0..d02eacea8f02dd1b1c3013e6bd14faa40aa66464
@@@ -11,7 -11,10 +11,8 @@@ https://developers.google.com/open-sour
  
  /* This header glues the reftable library to the rest of Git */
  
 -#define DISABLE_SIGN_COMPARE_WARNINGS
 -
  #include "git-compat-util.h"
+ #include "compat/zlib-compat.h"
  
  /*
   * An implementation-specific temporary file. By making this specific to the