Merge branch 'ab/darwin-default-to-sha1dc'

Use the SHA1DC implementation on macOS, just like other platforms,
by default.

* ab/darwin-default-to-sha1dc:
  Makefile: use sha1collisiondetection by default on OSX and Darwin
This commit is contained in:
Junio C Hamano 2022-12-26 11:42:07 +09:00
commit cd2cc44c02
2 changed files with 5 additions and 8 deletions

View file

@ -511,10 +511,8 @@ include shared.mak
# Define BLK_SHA1 to make use of optimized C SHA-1 routines bundled # Define BLK_SHA1 to make use of optimized C SHA-1 routines bundled
# with git (in the block-sha1/ directory). # with git (in the block-sha1/ directory).
# #
# Define NO_APPLE_COMMON_CRYPTO on OSX to opt-out of using the # Define APPLE_COMMON_CRYPTO_SHA1 to use Apple's CommonCrypto for
# "APPLE_COMMON_CRYPTO" backend for SHA-1, which is currently the # SHA-1.
# default on that OS. On macOS 01.4 (Tiger) or older,
# NO_APPLE_COMMON_CRYPTO is defined by default.
# #
# If don't enable any of the *_SHA1 settings in this section, Git will # If don't enable any of the *_SHA1 settings in this section, Git will
# default to its built-in sha1collisiondetection library, which is a # default to its built-in sha1collisiondetection library, which is a
@ -1911,7 +1909,7 @@ ifdef NO_POSIX_GOODIES
BASIC_CFLAGS += -DNO_POSIX_GOODIES BASIC_CFLAGS += -DNO_POSIX_GOODIES
endif endif
ifdef APPLE_COMMON_CRYPTO ifdef APPLE_COMMON_CRYPTO_SHA1
# Apple CommonCrypto requires chunking # Apple CommonCrypto requires chunking
SHA1_MAX_BLOCK_SIZE = 1024L*1024L*1024L SHA1_MAX_BLOCK_SIZE = 1024L*1024L*1024L
endif endif
@ -1928,7 +1926,7 @@ ifdef BLK_SHA1
LIB_OBJS += block-sha1/sha1.o LIB_OBJS += block-sha1/sha1.o
BASIC_CFLAGS += -DSHA1_BLK BASIC_CFLAGS += -DSHA1_BLK
else else
ifdef APPLE_COMMON_CRYPTO ifdef APPLE_COMMON_CRYPTO_SHA1
COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
BASIC_CFLAGS += -DSHA1_APPLE BASIC_CFLAGS += -DSHA1_APPLE
else else

View file

@ -258,8 +258,7 @@ macos-*)
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
else else
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)" MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
MAKEFLAGS="$MAKEFLAGS NO_APPLE_COMMON_CRYPTO=NoThanks" MAKEFLAGS="$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes"
MAKEFLAGS="$MAKEFLAGS NO_OPENSSL=NoThanks"
fi fi
;; ;;
esac esac