Skip to content

Commit 7ba4fa5

Browse files
committed
Merge branch 'js/eol-on-ourselves' into maint
Make sure our tests would pass when the sources are checked out with "platform native" line ending convention by default on Windows. Some "text" files out tests use and the test scripts themselves that are meant to be run with /bin/sh, ought to be checked out with eol=LF even on Windows. * js/eol-on-ourselves: t4051: mark supporting files as requiring LF-only line endings Fix the remaining tests that failed with core.autocrlf=true t3901: move supporting files into t/t3901/ completion: mark bash script as LF-only git-new-workdir: mark script as LF-only Fix build with core.autocrlf=true
2 parents 970fb22 + 2779f66 commit 7ba4fa5

11 files changed

+55
-26
lines changed

.gitattributes

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
* whitespace=!indent,trail,space
22
*.[ch] whitespace=indent,trail,space diff=cpp
3-
*.sh whitespace=indent,trail,space
3+
*.sh whitespace=indent,trail,space eol=lf
4+
*.perl eol=lf
5+
*.pm eol=lf
6+
/Documentation/git-*.txt eol=lf
7+
/command-list.txt eol=lf
8+
/GIT-VERSION-GEN eol=lf
9+
/mergetools/* eol=lf

contrib/completion/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.bash eol=lf

contrib/workdir/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/git-new-workdir eol=lf

git-gui/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
* encoding=US-ASCII
33
git-gui.sh encoding=UTF-8
44
/po/*.po encoding=UTF-8
5+
/GIT-VERSION-GEN eol=lf

t/.gitattributes

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
11
t[0-9][0-9][0-9][0-9]/* -whitespace
2-
t0110/url-* binary
2+
/diff-lib/* eol=lf
3+
/t0110/url-* binary
4+
/t3900/*.txt eol=lf
5+
/t3901/*.txt eol=lf
6+
/t4034/*/* eol=lf
7+
/t4013/* eol=lf
8+
/t4018/* eol=lf
9+
/t4051/* eol=lf
10+
/t4100/* eol=lf
11+
/t4101/* eol=lf
12+
/t4109/* eol=lf
13+
/t4110/* eol=lf
14+
/t4135/* eol=lf
15+
/t4211/* eol=lf
16+
/t4252/* eol=lf
17+
/t5100/* eol=lf
18+
/t5515/* eol=lf
19+
/t556x_common eol=lf
20+
/t7500/* eol=lf
21+
/t8005/*.txt eol=lf
22+
/t9*/*.dump eol=lf

t/t0203-gettext-setlocale-sanity.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ test_description="The Git C functions aren't broken by setlocale(3)"
88
. ./lib-gettext.sh
99

1010
test_expect_success 'git show a ISO-8859-1 commit under C locale' '
11-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
11+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
1212
test_commit "iso-c-commit" iso-under-c &&
1313
git show >out 2>err &&
1414
! test -s err &&
1515
grep -q "iso-c-commit" out
1616
'
1717

1818
test_expect_success GETTEXT_LOCALE 'git show a ISO-8859-1 commit under a UTF-8 locale' '
19-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
19+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
2020
test_commit "iso-utf8-commit" iso-under-utf8 &&
2121
LANGUAGE=is LC_ALL="$is_IS_locale" git show >out 2>err &&
2222
! test -s err &&

t/t3901-i18n-patch.sh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test_expect_success setup '
3131
3232
# use UTF-8 in author and committer name to match the
3333
# i18n.commitencoding settings
34-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
34+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
3535
3636
test_tick &&
3737
echo "$GIT_AUTHOR_NAME" >mine &&
@@ -55,7 +55,7 @@ test_expect_success setup '
5555
# the second one on the side branch is ISO-8859-1
5656
git config i18n.commitencoding ISO8859-1 &&
5757
# use author and committer name in ISO-8859-1 to match it.
58-
. "$TEST_DIRECTORY"/t3901-8859-1.txt
58+
. "$TEST_DIRECTORY"/t3901/8859-1.txt
5959
fi &&
6060
test_tick &&
6161
echo Yet another >theirs &&
@@ -100,7 +100,7 @@ test_expect_success 'rebase (U/U)' '
100100
101101
# The result will be committed by GIT_COMMITTER_NAME --
102102
# we want UTF-8 encoded name.
103-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
103+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
104104
git checkout -b test &&
105105
git rebase master &&
106106
@@ -110,7 +110,7 @@ test_expect_success 'rebase (U/U)' '
110110
test_expect_success 'rebase (U/L)' '
111111
git config i18n.commitencoding UTF-8 &&
112112
git config i18n.logoutputencoding ISO8859-1 &&
113-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
113+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
114114
115115
git reset --hard side &&
116116
git rebase master &&
@@ -122,7 +122,7 @@ test_expect_success !MINGW 'rebase (L/L)' '
122122
# In this test we want ISO-8859-1 encoded commits as the result
123123
git config i18n.commitencoding ISO8859-1 &&
124124
git config i18n.logoutputencoding ISO8859-1 &&
125-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
125+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
126126
127127
git reset --hard side &&
128128
git rebase master &&
@@ -135,7 +135,7 @@ test_expect_success !MINGW 'rebase (L/U)' '
135135
# to get ISO-8859-1 results.
136136
git config i18n.commitencoding ISO8859-1 &&
137137
git config i18n.logoutputencoding UTF-8 &&
138-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
138+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
139139
140140
git reset --hard side &&
141141
git rebase master &&
@@ -148,7 +148,7 @@ test_expect_success 'cherry-pick(U/U)' '
148148
149149
git config i18n.commitencoding UTF-8 &&
150150
git config i18n.logoutputencoding UTF-8 &&
151-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
151+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
152152
153153
git reset --hard master &&
154154
git cherry-pick side^ &&
@@ -163,7 +163,7 @@ test_expect_success !MINGW 'cherry-pick(L/L)' '
163163
164164
git config i18n.commitencoding ISO8859-1 &&
165165
git config i18n.logoutputencoding ISO8859-1 &&
166-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
166+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
167167
168168
git reset --hard master &&
169169
git cherry-pick side^ &&
@@ -178,7 +178,7 @@ test_expect_success 'cherry-pick(U/L)' '
178178
179179
git config i18n.commitencoding UTF-8 &&
180180
git config i18n.logoutputencoding ISO8859-1 &&
181-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
181+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
182182
183183
git reset --hard master &&
184184
git cherry-pick side^ &&
@@ -194,7 +194,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '
194194
195195
git config i18n.commitencoding ISO8859-1 &&
196196
git config i18n.logoutputencoding UTF-8 &&
197-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
197+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
198198
199199
git reset --hard master &&
200200
git cherry-pick side^ &&
@@ -207,7 +207,7 @@ test_expect_success !MINGW 'cherry-pick(L/U)' '
207207
test_expect_success 'rebase --merge (U/U)' '
208208
git config i18n.commitencoding UTF-8 &&
209209
git config i18n.logoutputencoding UTF-8 &&
210-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
210+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
211211
212212
git reset --hard side &&
213213
git rebase --merge master &&
@@ -218,7 +218,7 @@ test_expect_success 'rebase --merge (U/U)' '
218218
test_expect_success 'rebase --merge (U/L)' '
219219
git config i18n.commitencoding UTF-8 &&
220220
git config i18n.logoutputencoding ISO8859-1 &&
221-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
221+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
222222
223223
git reset --hard side &&
224224
git rebase --merge master &&
@@ -230,7 +230,7 @@ test_expect_success 'rebase --merge (L/L)' '
230230
# In this test we want ISO-8859-1 encoded commits as the result
231231
git config i18n.commitencoding ISO8859-1 &&
232232
git config i18n.logoutputencoding ISO8859-1 &&
233-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
233+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
234234
235235
git reset --hard side &&
236236
git rebase --merge master &&
@@ -243,7 +243,7 @@ test_expect_success 'rebase --merge (L/U)' '
243243
# to get ISO-8859-1 results.
244244
git config i18n.commitencoding ISO8859-1 &&
245245
git config i18n.logoutputencoding UTF-8 &&
246-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
246+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
247247
248248
git reset --hard side &&
249249
git rebase --merge master &&
@@ -254,7 +254,7 @@ test_expect_success 'rebase --merge (L/U)' '
254254
test_expect_success 'am (U/U)' '
255255
# Apply UTF-8 patches with UTF-8 commitencoding
256256
git config i18n.commitencoding UTF-8 &&
257-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
257+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
258258
259259
git reset --hard master &&
260260
git am out-u1 out-u2 &&
@@ -265,7 +265,7 @@ test_expect_success 'am (U/U)' '
265265
test_expect_success !MINGW 'am (L/L)' '
266266
# Apply ISO-8859-1 patches with ISO-8859-1 commitencoding
267267
git config i18n.commitencoding ISO8859-1 &&
268-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
268+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
269269
270270
git reset --hard master &&
271271
git am out-l1 out-l2 &&
@@ -276,7 +276,7 @@ test_expect_success !MINGW 'am (L/L)' '
276276
test_expect_success 'am (U/L)' '
277277
# Apply ISO-8859-1 patches with UTF-8 commitencoding
278278
git config i18n.commitencoding UTF-8 &&
279-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
279+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
280280
git reset --hard master &&
281281
282282
# am specifies --utf8 by default.
@@ -288,7 +288,7 @@ test_expect_success 'am (U/L)' '
288288
test_expect_success 'am --no-utf8 (U/L)' '
289289
# Apply ISO-8859-1 patches with UTF-8 commitencoding
290290
git config i18n.commitencoding UTF-8 &&
291-
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
291+
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
292292
293293
git reset --hard master &&
294294
git am --no-utf8 out-l1 out-l2 2>err &&
@@ -303,7 +303,7 @@ test_expect_success 'am --no-utf8 (U/L)' '
303303
test_expect_success !MINGW 'am (L/U)' '
304304
# Apply UTF-8 patches with ISO-8859-1 commitencoding
305305
git config i18n.commitencoding ISO8859-1 &&
306-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
306+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
307307
308308
git reset --hard master &&
309309
# mailinfo will re-code the commit message to the charset specified by
File renamed without changes.
File renamed without changes.

t/t9350-fast-export.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ test_expect_success 'iso-8859-1' '
7070
7171
git config i18n.commitencoding ISO8859-1 &&
7272
# use author and committer name in ISO-8859-1 to match it.
73-
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
73+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
7474
test_tick &&
7575
echo rosten >file &&
7676
git commit -s -m den file &&

0 commit comments

Comments
 (0)