Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 616c7ba

Browse files
committed
Merge 'win-tests-fixes' into HEAD
2 parents 85efa6f + da5160a commit 616c7ba

33 files changed

+236
-117
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,9 @@ ifdef NO_REGEX
14791479
COMPAT_CFLAGS += -Icompat/regex
14801480
COMPAT_OBJS += compat/regex/regex.o
14811481
endif
1482+
ifdef NATIVE_CRLF
1483+
BASIC_CFLAGS += -DNATIVE_CRLF
1484+
endif
14821485

14831486
ifdef USE_NED_ALLOCATOR
14841487
COMPAT_CFLAGS += -Icompat/nedmalloc

git-am.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ It does not apply to blobs recorded in its index.")"
182182
}
183183

184184
clean_abort () {
185-
test $# = 0 || echo >&2 "$@"
185+
test $# = 0 || cat >&2 <<EOF
186+
$@
187+
EOF
186188
rm -fr "$dotest"
187189
exit 1
188190
}

git-merge-octopus.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ do
7171

7272
case "$LF$common$LF" in
7373
*"$LF$SHA1$LF"*)
74-
echo "Already up-to-date with $pretty_name"
74+
cat << EOF
75+
Already up-to-date with $pretty_name
76+
EOF
7577
continue
7678
;;
7779
esac
@@ -83,15 +85,19 @@ do
8385
# tree as the intermediate result of the merge.
8486
# We still need to count this as part of the parent set.
8587

86-
echo "Fast-forwarding to: $pretty_name"
88+
cat << EOF
89+
Fast-forwarding to: $pretty_name
90+
EOF
8791
git read-tree -u -m $head $SHA1 || exit
8892
MRC=$SHA1 MRT=$(git write-tree)
8993
continue
9094
fi
9195

9296
NON_FF_MERGE=1
9397

94-
echo "Trying simple merge with $pretty_name"
98+
cat << EOF
99+
Trying simple merge with $pretty_name
100+
EOF
95101
git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
96102
next=$(git write-tree 2>/dev/null)
97103
if test $? -ne 0

git-sh-setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ GIT_QUIET=
5959
say () {
6060
if test -z "$GIT_QUIET"
6161
then
62-
printf '%s\n' "$*"
62+
cat <<EOF
63+
$*
64+
EOF
6365
fi
6466
}
6567

git-submodule.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,11 @@ cmd_add()
431431

432432
if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" > /dev/null 2>&1
433433
then
434-
eval_gettextln "The following path is ignored by one of your .gitignore files:
435-
\$sm_path
436-
Use -f if you really want to add it." >&2
434+
cat >&2 <<EOF
435+
The following path is ignored by one of your .gitignore files:
436+
$(eval_gettextln $sm_path)
437+
Use -f if you really want to add it.
438+
EOF
437439
exit 1
438440
fi
439441

t/annotate-tests.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -251,27 +251,27 @@ test_expect_success 'blame -L X,-N' '
251251
'
252252

253253
test_expect_success 'blame -L /RE/ (RE to end)' '
254-
check_count -L/evil/ C 1 "A U Thor" 1
254+
check_count -L/\;*evil/ C 1 "A U Thor" 1
255255
'
256256

257257
test_expect_success 'blame -L /RE/,/RE2/' '
258-
check_count -L/robot/,/green/ A 1 B 1 B2 1 D 1 E 1
258+
check_count -L/\;*robot/,/\;*green/ A 1 B 1 B2 1 D 1 E 1
259259
'
260260

261261
test_expect_success 'blame -L X,/RE/' '
262-
check_count -L5,/evil/ B1 1 D 1 "A U Thor" 1
262+
check_count -L5,/\;*evil/ B1 1 D 1 "A U Thor" 1
263263
'
264264

265265
test_expect_success 'blame -L /RE/,Y' '
266-
check_count -L/99/,7 B1 1 D 1 "A U Thor" 1
266+
check_count -L/\;*99/,7 B1 1 D 1 "A U Thor" 1
267267
'
268268

269269
test_expect_success 'blame -L /RE/,+N' '
270-
check_count -L/99/,+3 B1 1 D 1 "A U Thor" 1
270+
check_count -L/\;*99/,+3 B1 1 D 1 "A U Thor" 1
271271
'
272272

273273
test_expect_success 'blame -L /RE/,-N' '
274-
check_count -L/99/,-3 B 1 B2 1 D 1
274+
check_count -L/\;*99/,-3 B 1 B2 1 D 1
275275
'
276276

277277
# 'file' ends with an incomplete line, so 'wc' reports one fewer lines than
@@ -337,31 +337,31 @@ test_expect_success 'blame -L multiple (superset/subset: unordered)' '
337337
'
338338

339339
test_expect_success 'blame -L /RE/ (relative)' '
340-
check_count -L3,3 -L/fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
340+
check_count -L3,3 -L/\;*fox/ B1 1 B2 1 C 1 D 1 "A U Thor" 1
341341
'
342342

343343
test_expect_success 'blame -L /RE/ (relative: no preceding range)' '
344-
check_count -L/dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
344+
check_count -L/\;*dog/ A 1 B 1 B1 1 B2 1 C 1 D 1 "A U Thor" 1
345345
'
346346

347347
test_expect_success 'blame -L /RE/ (relative: adjacent)' '
348-
check_count -L1,1 -L/dog/,+1 A 1 E 1
348+
check_count -L1,1 -L/\;*dog/,+1 A 1 E 1
349349
'
350350

351351
test_expect_success 'blame -L /RE/ (relative: not found)' '
352-
test_must_fail $PROG -L4,4 -L/dog/ file
352+
test_must_fail $PROG -L4,4 -L/\;*dog/ file
353353
'
354354

355355
test_expect_success 'blame -L /RE/ (relative: end-of-file)' '
356356
test_must_fail $PROG -L, -L/$/ file
357357
'
358358

359359
test_expect_success 'blame -L ^/RE/ (absolute)' '
360-
check_count -L3,3 -L^/dog/,+2 A 1 B2 1
360+
check_count -L3,3 -L^/\;*dog/,+2 A 1 B2 1
361361
'
362362

363363
test_expect_success 'blame -L ^/RE/ (absolute: no preceding range)' '
364-
check_count -L^/dog/,+2 A 1 B2 1
364+
check_count -L^/\;*dog/,+2 A 1 B2 1
365365
'
366366

367367
test_expect_success 'blame -L ^/RE/ (absolute: not found)' '

t/lib-credential.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ check() {
1919
false
2020
fi &&
2121
test_cmp expect-stdout stdout &&
22-
test_cmp expect-stderr stderr
22+
test_cmp_text expect-stderr stderr
2323
}
2424

2525
read_chunk() {

t/t0008-ignores.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ test_description=check-ignore
55
. ./test-lib.sh
66

77
init_vars () {
8-
global_excludes="$(pwd)/global-excludes"
8+
# On Windows, avoid using "C:" in the global-excludes paths.
9+
if test_have_prereq MINGW
10+
then
11+
global_excludes="global-excludes"
12+
else
13+
global_excludes="$(pwd)/global-excludes"
14+
fi
915
}
1016

1117
enable_global_excludes () {

t/t0026-eol-config.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,22 @@ test_expect_success 'autocrlf=true overrides unset eol' '
8080
test -z "$onediff" -a -z "$twodiff"
8181
'
8282

83+
test_expect_success NATIVE_CRLF 'eol native is crlf' '
84+
85+
rm -rf native_eol && mkdir native_eol &&
86+
( cd native_eol &&
87+
printf "*.txt text\n" > .gitattributes
88+
printf "one\r\ntwo\r\nthree\r\n" > filedos.txt
89+
printf "one\ntwo\nthree\n" > fileunix.txt
90+
git init &&
91+
git config core.autocrlf false &&
92+
git config core.eol native &&
93+
git add filedos.txt fileunix.txt &&
94+
git commit -m "first" &&
95+
rm file*.txt &&
96+
git reset --hard HEAD &&
97+
has_cr filedos.txt && has_cr fileunix.txt
98+
)
99+
'
100+
83101
test_done

t/t0081-line-buffer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_expect_success '0-length read, send along greeting' '
2929
test_cmp expect actual
3030
'
3131

32-
test_expect_success 'read from file descriptor' '
32+
test_expect_success NOT_MINGW 'read from file descriptor' '
3333
rm -f input &&
3434
echo hello >expect &&
3535
echo hello >input &&

0 commit comments

Comments
 (0)