mirror of
https://github.com/git/git
synced 2024-09-12 21:04:12 +00:00
4c7fda8fc1
OpenBSD's regex library has a repetition limit (RE_DUP_MAX) of 255. That's the minimum acceptable value according to POSIX. In t4062 we use 4096 repetitions in the test "-G matches", though, causing it to fail. Combine two repetition operators, both less than 256, to arrive at 4096 zeros instead of using a single one, to fix the test on OpenBSD. Original-patch-by: David Coppa <dcoppa@openbsd.org> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
25 lines
492 B
Bash
Executable file
25 lines
492 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Copyright (c) 2016 Johannes Schindelin
|
|
#
|
|
|
|
test_description='Pickaxe options'
|
|
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success setup '
|
|
test_commit initial &&
|
|
printf "%04096d" 0 >4096-zeroes.txt &&
|
|
git add 4096-zeroes.txt &&
|
|
test_tick &&
|
|
git commit -m "A 4k file"
|
|
'
|
|
|
|
# OpenBSD only supports up to 255 repetitions, so repeat twice for 64*64=4096.
|
|
test_expect_success '-G matches' '
|
|
git diff --name-only -G "^(0{64}){64}$" HEAD^ >out &&
|
|
test 4096-zeroes.txt = "$(cat out)"
|
|
'
|
|
|
|
test_done
|