File tree Expand file tree Collapse file tree 7 files changed +28
-7
lines changed Expand file tree Collapse file tree 7 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 3
3
test_description=gitattributes
4
4
5
5
TEST_PASSES_SANITIZE_LEAK=true
6
+ TEST_CREATE_REPO_NO_TEMPLATE=1
6
7
. ./test-lib.sh
7
8
8
9
attr_check_basic () {
@@ -284,7 +285,7 @@ test_expect_success 'using --git-dir and --work-tree' '
284
285
'
285
286
286
287
test_expect_success ' setup bare' '
287
- git clone --bare . bare.git
288
+ git clone --template= -- bare . bare.git
288
289
'
289
290
290
291
test_expect_success ' bare repository: check that .gitattribute is ignored' '
@@ -315,6 +316,7 @@ test_expect_success 'bare repository: check that --cached honors index' '
315
316
test_expect_success ' bare repository: test info/attributes' '
316
317
(
317
318
cd bare.git &&
319
+ mkdir info &&
318
320
(
319
321
echo "f test=f" &&
320
322
echo "a/i test=a/i"
@@ -360,6 +362,7 @@ test_expect_success SYMLINKS 'symlinks respected in core.attributesFile' '
360
362
361
363
test_expect_success SYMLINKS ' symlinks respected in info/attributes' '
362
364
test_when_finished "rm .git/info/attributes" &&
365
+ mkdir .git/info &&
363
366
ln -s ../../attr .git/info/attributes &&
364
367
attr_check file set
365
368
'
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ test_description='working-tree-encoding conversion via gitattributes'
5
5
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
6
6
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
7
7
8
+ TEST_CREATE_REPO_NO_TEMPLATE=1
8
9
. ./test-lib.sh
9
10
. " $TEST_DIRECTORY /lib-encoding.sh"
10
11
@@ -69,6 +70,7 @@ test_expect_success 'check $GIT_DIR/info/attributes support' '
69
70
test_when_finished "rm -f test.utf32.git" &&
70
71
test_when_finished "git reset --hard HEAD" &&
71
72
73
+ mkdir .git/info &&
72
74
echo "*.utf32 text working-tree-encoding=utf-32" >.git/info/attributes &&
73
75
git add test.utf32 &&
74
76
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ commit id embedding:
24
24
25
25
'
26
26
27
+ TEST_CREATE_REPO_NO_TEMPLATE=1
27
28
. ./test-lib.sh
28
29
29
30
SUBSTFORMAT=%H%n
@@ -143,6 +144,7 @@ test_expect_success 'populate workdir' '
143
144
test_expect_success \
144
145
' add ignored file' \
145
146
' echo ignore me >a/ignored &&
147
+ mkdir .git/info &&
146
148
echo ignored export-ignore >.git/info/attributes'
147
149
148
150
test_expect_success ' add files to repository' '
@@ -157,7 +159,8 @@ test_expect_success 'setup export-subst' '
157
159
'
158
160
159
161
test_expect_success ' create bare clone' '
160
- git clone --bare . bare.git &&
162
+ git clone --template= --bare . bare.git &&
163
+ mkdir bare.git/info &&
161
164
cp .git/info/attributes bare.git/info/attributes
162
165
'
163
166
Original file line number Diff line number Diff line change 2
2
3
3
test_description=' git archive attribute tests'
4
4
5
+ TEST_CREATE_REPO_NO_TEMPLATE=1
5
6
. ./test-lib.sh
6
7
7
8
SUBSTFORMAT=' %H (%h)%n'
@@ -20,6 +21,7 @@ extract_tar_to_dir () {
20
21
21
22
test_expect_success ' setup' '
22
23
echo ignored >ignored &&
24
+ mkdir .git/info &&
23
25
echo ignored export-ignore >>.git/info/attributes &&
24
26
git add ignored &&
25
27
@@ -46,7 +48,8 @@ test_expect_success 'setup' '
46
48
47
49
git commit -m. &&
48
50
49
- git clone --bare . bare &&
51
+ git clone --template= --bare . bare &&
52
+ mkdir bare/info &&
50
53
cp .git/info/attributes bare/info/attributes
51
54
'
52
55
Original file line number Diff line number Diff line change 3
3
test_description=' git archive attribute pattern tests'
4
4
5
5
TEST_PASSES_SANITIZE_LEAK=true
6
+ TEST_CREATE_REPO_NO_TEMPLATE=1
6
7
. ./test-lib.sh
7
8
8
9
test_expect_exists () {
@@ -15,6 +16,7 @@ test_expect_missing() {
15
16
16
17
test_expect_success ' setup' '
17
18
echo ignored >ignored &&
19
+ mkdir .git/info &&
18
20
echo ignored export-ignore >>.git/info/attributes &&
19
21
git add ignored &&
20
22
@@ -54,7 +56,8 @@ test_expect_success 'setup' '
54
56
55
57
git commit -m. &&
56
58
57
- git clone --bare . bare &&
59
+ git clone --template= --bare . bare &&
60
+ mkdir bare/info &&
58
61
cp .git/info/attributes bare/info/attributes
59
62
'
60
63
Original file line number Diff line number Diff line change 2
2
3
3
test_description=' git archive --format=zip test'
4
4
5
+ TEST_CREATE_REPO_NO_TEMPLATE=1
5
6
. ./test-lib.sh
6
7
7
8
SUBSTFORMAT=%H%n
@@ -121,6 +122,7 @@ test_expect_success 'prepare file list' '
121
122
test_expect_success \
122
123
' add ignored file' \
123
124
' echo ignore me >a/ignored &&
125
+ mkdir .git/info &&
124
126
echo ignored export-ignore >.git/info/attributes'
125
127
126
128
test_expect_success ' add files to repository' '
@@ -139,7 +141,8 @@ test_expect_success 'setup export-subst and diff attributes' '
139
141
'
140
142
141
143
test_expect_success ' create bare clone' '
142
- git clone --bare . bare.git &&
144
+ git clone --template= --bare . bare.git &&
145
+ mkdir bare.git/info &&
143
146
cp .git/info/attributes bare.git/info/attributes &&
144
147
# Recreate our changes to .git/config rather than just copying it, as
145
148
# we do not want to clobber core.bare or other settings.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ This test verifies the recurse-submodules feature correctly greps across
6
6
submodules.
7
7
'
8
8
9
+ TEST_CREATE_REPO_NO_TEMPLATE=1
9
10
. ./test-lib.sh
10
11
11
12
GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB=1
@@ -471,8 +472,10 @@ test_expect_failure 'grep --textconv: superproject .gitattributes (from index) d
471
472
test_expect_failure ' grep --textconv: superproject .git/info/attributes does not affect submodules' '
472
473
reset_and_clean &&
473
474
test_config_global diff.d2x.textconv "sed -e \"s/d/x/\"" &&
474
- super_attr="$(git rev-parse --git-path info/attributes)" &&
475
+ super_info="$(git rev-parse --git-path info)" &&
476
+ super_attr="$super_info/attributes" &&
475
477
test_when_finished "rm -f \"$super_attr\"" &&
478
+ mkdir "$super_info" &&
476
479
echo "a diff=d2x" >"$super_attr" &&
477
480
478
481
cat >expect <<-\EOF &&
@@ -516,7 +519,8 @@ test_expect_failure 'grep --textconv correctly reads submodule .git/info/attribu
516
519
reset_and_clean &&
517
520
test_config_global diff.d2x.textconv "sed -e \"s/d/x/\"" &&
518
521
519
- submodule_attr="$(git -C submodule rev-parse --path-format=absolute --git-path info/attributes)" &&
522
+ submodule_info="$(git -C submodule rev-parse --path-format=absolute --git-path info)" &&
523
+ submodule_attr="$submodule_info/attributes" &&
520
524
test_when_finished "rm -f \"$submodule_attr\"" &&
521
525
echo "a diff=d2x" >"$submodule_attr" &&
522
526
You can’t perform that action at this time.
0 commit comments