Skip to content

Commit 3de7ee3

Browse files
ROGERSM94gitster
authored andcommitted
t1300: fix over-indented HERE-DOCs
Prepare for the following patches by removing extraneous indents from HERE-DOCs used in config tests. Signed-off-by: Matthew Rogers <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 329e6ec commit 3de7ee3

File tree

1 file changed

+84
-84
lines changed

1 file changed

+84
-84
lines changed

t/t1300-config.sh

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,47 +1191,47 @@ test_expect_success 'old-fashioned settings are case insensitive' '
11911191
test_when_finished "rm -f testConfig testConfig_expect testConfig_actual" &&
11921192
11931193
cat >testConfig_actual <<-EOF &&
1194-
[V.A]
1195-
r = value1
1194+
[V.A]
1195+
r = value1
11961196
EOF
11971197
q_to_tab >testConfig_expect <<-EOF &&
1198-
[V.A]
1199-
Qr = value2
1198+
[V.A]
1199+
Qr = value2
12001200
EOF
12011201
git config -f testConfig_actual "v.a.r" value2 &&
12021202
test_cmp testConfig_expect testConfig_actual &&
12031203
12041204
cat >testConfig_actual <<-EOF &&
1205-
[V.A]
1206-
r = value1
1205+
[V.A]
1206+
r = value1
12071207
EOF
12081208
q_to_tab >testConfig_expect <<-EOF &&
1209-
[V.A]
1210-
QR = value2
1209+
[V.A]
1210+
QR = value2
12111211
EOF
12121212
git config -f testConfig_actual "V.a.R" value2 &&
12131213
test_cmp testConfig_expect testConfig_actual &&
12141214
12151215
cat >testConfig_actual <<-EOF &&
1216-
[V.A]
1217-
r = value1
1216+
[V.A]
1217+
r = value1
12181218
EOF
12191219
q_to_tab >testConfig_expect <<-EOF &&
1220-
[V.A]
1221-
r = value1
1222-
Qr = value2
1220+
[V.A]
1221+
r = value1
1222+
Qr = value2
12231223
EOF
12241224
git config -f testConfig_actual "V.A.r" value2 &&
12251225
test_cmp testConfig_expect testConfig_actual &&
12261226
12271227
cat >testConfig_actual <<-EOF &&
1228-
[V.A]
1229-
r = value1
1228+
[V.A]
1229+
r = value1
12301230
EOF
12311231
q_to_tab >testConfig_expect <<-EOF &&
1232-
[V.A]
1233-
r = value1
1234-
Qr = value2
1232+
[V.A]
1233+
r = value1
1234+
Qr = value2
12351235
EOF
12361236
git config -f testConfig_actual "v.A.r" value2 &&
12371237
test_cmp testConfig_expect testConfig_actual
@@ -1241,26 +1241,26 @@ test_expect_success 'setting different case sensitive subsections ' '
12411241
test_when_finished "rm -f testConfig testConfig_expect testConfig_actual" &&
12421242
12431243
cat >testConfig_actual <<-EOF &&
1244-
[V "A"]
1245-
R = v1
1246-
[K "E"]
1247-
Y = v1
1248-
[a "b"]
1249-
c = v1
1250-
[d "e"]
1251-
f = v1
1244+
[V "A"]
1245+
R = v1
1246+
[K "E"]
1247+
Y = v1
1248+
[a "b"]
1249+
c = v1
1250+
[d "e"]
1251+
f = v1
12521252
EOF
12531253
q_to_tab >testConfig_expect <<-EOF &&
1254-
[V "A"]
1255-
Qr = v2
1256-
[K "E"]
1257-
Qy = v2
1258-
[a "b"]
1259-
Qc = v2
1260-
[d "e"]
1261-
f = v1
1262-
[d "E"]
1263-
Qf = v2
1254+
[V "A"]
1255+
Qr = v2
1256+
[K "E"]
1257+
Qy = v2
1258+
[a "b"]
1259+
Qc = v2
1260+
[d "e"]
1261+
f = v1
1262+
[d "E"]
1263+
Qf = v2
12641264
EOF
12651265
# exact match
12661266
git config -f testConfig_actual a.b.c v2 &&
@@ -1622,57 +1622,57 @@ test_expect_success 'set up --show-origin tests' '
16221622
INCLUDE_DIR="$HOME/include" &&
16231623
mkdir -p "$INCLUDE_DIR" &&
16241624
cat >"$INCLUDE_DIR"/absolute.include <<-\EOF &&
1625-
[user]
1626-
absolute = include
1625+
[user]
1626+
absolute = include
16271627
EOF
16281628
cat >"$INCLUDE_DIR"/relative.include <<-\EOF &&
1629-
[user]
1630-
relative = include
1629+
[user]
1630+
relative = include
16311631
EOF
16321632
cat >"$HOME"/.gitconfig <<-EOF &&
1633-
[user]
1634-
global = true
1635-
override = global
1636-
[include]
1637-
path = "$INCLUDE_DIR/absolute.include"
1633+
[user]
1634+
global = true
1635+
override = global
1636+
[include]
1637+
path = "$INCLUDE_DIR/absolute.include"
16381638
EOF
16391639
cat >.git/config <<-\EOF
1640-
[user]
1641-
local = true
1642-
override = local
1643-
[include]
1644-
path = ../include/relative.include
1640+
[user]
1641+
local = true
1642+
override = local
1643+
[include]
1644+
path = ../include/relative.include
16451645
EOF
16461646
'
16471647

16481648
test_expect_success '--show-origin with --list' '
16491649
cat >expect <<-EOF &&
1650-
file:$HOME/.gitconfig user.global=true
1651-
file:$HOME/.gitconfig user.override=global
1652-
file:$HOME/.gitconfig include.path=$INCLUDE_DIR/absolute.include
1653-
file:$INCLUDE_DIR/absolute.include user.absolute=include
1654-
file:.git/config user.local=true
1655-
file:.git/config user.override=local
1656-
file:.git/config include.path=../include/relative.include
1657-
file:.git/../include/relative.include user.relative=include
1658-
command line: user.cmdline=true
1650+
file:$HOME/.gitconfig user.global=true
1651+
file:$HOME/.gitconfig user.override=global
1652+
file:$HOME/.gitconfig include.path=$INCLUDE_DIR/absolute.include
1653+
file:$INCLUDE_DIR/absolute.include user.absolute=include
1654+
file:.git/config user.local=true
1655+
file:.git/config user.override=local
1656+
file:.git/config include.path=../include/relative.include
1657+
file:.git/../include/relative.include user.relative=include
1658+
command line: user.cmdline=true
16591659
EOF
16601660
git -c user.cmdline=true config --list --show-origin >output &&
16611661
test_cmp expect output
16621662
'
16631663

16641664
test_expect_success '--show-origin with --list --null' '
16651665
cat >expect <<-EOF &&
1666-
file:$HOME/.gitconfigQuser.global
1667-
trueQfile:$HOME/.gitconfigQuser.override
1668-
globalQfile:$HOME/.gitconfigQinclude.path
1669-
$INCLUDE_DIR/absolute.includeQfile:$INCLUDE_DIR/absolute.includeQuser.absolute
1670-
includeQfile:.git/configQuser.local
1671-
trueQfile:.git/configQuser.override
1672-
localQfile:.git/configQinclude.path
1673-
../include/relative.includeQfile:.git/../include/relative.includeQuser.relative
1674-
includeQcommand line:Quser.cmdline
1675-
trueQ
1666+
file:$HOME/.gitconfigQuser.global
1667+
trueQfile:$HOME/.gitconfigQuser.override
1668+
globalQfile:$HOME/.gitconfigQinclude.path
1669+
$INCLUDE_DIR/absolute.includeQfile:$INCLUDE_DIR/absolute.includeQuser.absolute
1670+
includeQfile:.git/configQuser.local
1671+
trueQfile:.git/configQuser.override
1672+
localQfile:.git/configQinclude.path
1673+
../include/relative.includeQfile:.git/../include/relative.includeQuser.relative
1674+
includeQcommand line:Quser.cmdline
1675+
trueQ
16761676
EOF
16771677
git -c user.cmdline=true config --null --list --show-origin >output.raw &&
16781678
nul_to_q <output.raw >output &&
@@ -1684,26 +1684,26 @@ test_expect_success '--show-origin with --list --null' '
16841684

16851685
test_expect_success '--show-origin with single file' '
16861686
cat >expect <<-\EOF &&
1687-
file:.git/config user.local=true
1688-
file:.git/config user.override=local
1689-
file:.git/config include.path=../include/relative.include
1687+
file:.git/config user.local=true
1688+
file:.git/config user.override=local
1689+
file:.git/config include.path=../include/relative.include
16901690
EOF
16911691
git config --local --list --show-origin >output &&
16921692
test_cmp expect output
16931693
'
16941694

16951695
test_expect_success '--show-origin with --get-regexp' '
16961696
cat >expect <<-EOF &&
1697-
file:$HOME/.gitconfig user.global true
1698-
file:.git/config user.local true
1697+
file:$HOME/.gitconfig user.global true
1698+
file:.git/config user.local true
16991699
EOF
17001700
git config --show-origin --get-regexp "user\.[g|l].*" >output &&
17011701
test_cmp expect output
17021702
'
17031703

17041704
test_expect_success '--show-origin getting a single key' '
17051705
cat >expect <<-\EOF &&
1706-
file:.git/config local
1706+
file:.git/config local
17071707
EOF
17081708
git config --show-origin user.override >output &&
17091709
test_cmp expect output
@@ -1712,34 +1712,34 @@ test_expect_success '--show-origin getting a single key' '
17121712
test_expect_success 'set up custom config file' '
17131713
CUSTOM_CONFIG_FILE="file\" (dq) and spaces.conf" &&
17141714
cat >"$CUSTOM_CONFIG_FILE" <<-\EOF
1715-
[user]
1716-
custom = true
1715+
[user]
1716+
custom = true
17171717
EOF
17181718
'
17191719

17201720
test_expect_success !MINGW '--show-origin escape special file name characters' '
17211721
cat >expect <<-\EOF &&
1722-
file:"file\" (dq) and spaces.conf" user.custom=true
1722+
file:"file\" (dq) and spaces.conf" user.custom=true
17231723
EOF
17241724
git config --file "$CUSTOM_CONFIG_FILE" --show-origin --list >output &&
17251725
test_cmp expect output
17261726
'
17271727

17281728
test_expect_success '--show-origin stdin' '
17291729
cat >expect <<-\EOF &&
1730-
standard input: user.custom=true
1730+
standard input: user.custom=true
17311731
EOF
17321732
git config --file - --show-origin --list <"$CUSTOM_CONFIG_FILE" >output &&
17331733
test_cmp expect output
17341734
'
17351735

17361736
test_expect_success '--show-origin stdin with file include' '
17371737
cat >"$INCLUDE_DIR"/stdin.include <<-EOF &&
1738-
[user]
1739-
stdin = include
1738+
[user]
1739+
stdin = include
17401740
EOF
17411741
cat >expect <<-EOF &&
1742-
file:$INCLUDE_DIR/stdin.include include
1742+
file:$INCLUDE_DIR/stdin.include include
17431743
EOF
17441744
echo "[include]path=\"$INCLUDE_DIR\"/stdin.include" |
17451745
git config --show-origin --includes --file - user.stdin >output &&
@@ -1750,15 +1750,15 @@ test_expect_success '--show-origin stdin with file include' '
17501750
test_expect_success !MINGW '--show-origin blob' '
17511751
blob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") &&
17521752
cat >expect <<-EOF &&
1753-
blob:$blob user.custom=true
1753+
blob:$blob user.custom=true
17541754
EOF
17551755
git config --blob=$blob --show-origin --list >output &&
17561756
test_cmp expect output
17571757
'
17581758

17591759
test_expect_success !MINGW '--show-origin blob ref' '
17601760
cat >expect <<-\EOF &&
1761-
blob:"master:file\" (dq) and spaces.conf" user.custom=true
1761+
blob:"master:file\" (dq) and spaces.conf" user.custom=true
17621762
EOF
17631763
git add "$CUSTOM_CONFIG_FILE" &&
17641764
git commit -m "new config file" &&

0 commit comments

Comments
 (0)