t3905: remove spaces after redirect operators
For shell scripts, the usual convention is for there to be no space after redirection operators, (e.g. `>file`, not `> file`). Remove these spaces wherever they appear. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Feb 8, 2021 at 23:28 UTC
32b7385e435b114e7a3d2b1c8c21f5f48ba17db5
1 file changed
+20
-20
t/t3905-stash-include-untracked.sh
+20
-20
@@ -8,16 +8,16 @@ test_description='Test git stash --include-untracked'
8
. ./test-lib.sh
9
10
test_expect_success 'stash save --include-untracked some dirty working directory' '
11
- echo 1 > file &&
11
+ echo 1 >file &&
12
git add file &&
13
test_tick &&
14
git commit -m initial &&
15
- echo 2 > file &&
15
+ echo 2 >file &&
16
git add file &&
17
- echo 3 > file &&
17
+ echo 3 >file &&
18
test_tick &&
19
- echo 1 > file2 &&
20
- echo 1 > HEAD &&
19
+ echo 1 >file2 &&
20
+ echo 1 >HEAD &&
21
mkdir untracked &&
22
echo untracked >untracked/untracked &&
23
git stash --include-untracked &&
@@ -25,7 +25,7 @@ test_expect_success 'stash save --include-untracked some dirty working directory
25
git diff-index --cached --quiet HEAD
26
'
27
28
-cat > expect <<EOF
28
+cat >expect <<EOF
29
?? actual
30
?? expect
31
EOF
@@ -37,7 +37,7 @@ test_expect_success 'stash save --include-untracked cleaned the untracked files'
37
38
tracked=$(git rev-parse --short $(echo 1 | git hash-object --stdin))
39
untracked=$(git rev-parse --short $(echo untracked | git hash-object --stdin))
40
-cat > expect.diff <<EOF
40
+cat >expect.diff <<EOF
41
diff --git a/HEAD b/HEAD
42
new file mode 100644
43
index 0000000..$tracked
@@ -60,7 +60,7 @@ index 0000000..$untracked
60
@@ -0,0 +1 @@
61
+untracked
62
EOF
63
-cat > expect.lstree <<EOF
63
+cat >expect.lstree <<EOF
64
HEAD
65
file2
66
untracked
@@ -85,7 +85,7 @@ test_expect_success 'stash save --patch --all fails' '
85
86
git clean --force --quiet
87
88
-cat > expect <<EOF
88
+cat >expect <<EOF
89
M file
90
?? HEAD
91
?? actual
@@ -105,14 +105,14 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
105
git clean --force --quiet -d
106
107
test_expect_success 'stash save -u dirty index' '
108
- echo 4 > file3 &&
108
+ echo 4 >file3 &&
109
git add file3 &&
110
test_tick &&
111
git stash -u
112
'
113
114
blob=$(git rev-parse --short $(echo 4 | git hash-object --stdin))
115
-cat > expect <<EOF
115
+cat >expect <<EOF
116
diff --git a/file3 b/file3
117
new file mode 100644
118
index 0000000..$blob
@@ -128,12 +128,12 @@ test_expect_success 'stash save --include-untracked dirty index got stashed' '
128
test_cmp expect actual
129
'
130
131
-git reset > /dev/null
131
+git reset >/dev/null
132
133
# Must direct output somewhere where it won't be considered an untracked file
134
test_expect_success 'stash save --include-untracked -q is quiet' '
135
- echo 1 > file5 &&
136
- git stash save --include-untracked --quiet > .git/stash-output.out 2>&1 &&
135
+ echo 1 >file5 &&
136
+ git stash save --include-untracked --quiet >.git/stash-output.out 2>&1 &&
137
test_line_count = 0 .git/stash-output.out &&
138
rm -f .git/stash-output.out
139
'
@@ -141,7 +141,7 @@ test_expect_success 'stash save --include-untracked -q is quiet' '
141
test_expect_success 'stash save --include-untracked removed files' '
142
rm -f file &&
143
git stash save --include-untracked &&
144
- echo 1 > expect &&
144
+ echo 1 >expect &&
145
test_cmp expect file
146
'
147
@@ -152,14 +152,14 @@ test_expect_success 'stash save --include-untracked removed files got stashed' '
152
test_path_is_missing file
153
'
154
155
-cat > .gitignore <<EOF
155
+cat >.gitignore <<EOF
156
.gitignore
157
ignored
158
ignored.d/
159
EOF
160
161
test_expect_success 'stash save --include-untracked respects .gitignore' '
162
- echo ignored > ignored &&
162
+ echo ignored >ignored &&
163
mkdir ignored.d &&
164
echo ignored >ignored.d/untracked &&
165
git stash -u &&
@@ -169,7 +169,7 @@ test_expect_success 'stash save --include-untracked respects .gitignore' '
169
'
170
171
test_expect_success 'stash save -u can stash with only untracked files different' '
172
- echo 4 > file4 &&
172
+ echo 4 >file4 &&
173
git stash -u &&
174
test_path_is_missing file4
175
'
@@ -214,7 +214,7 @@ test_expect_success 'stash push with $IFS character' '
214
test_path_is_file bar
215
'
216
217
-cat > .gitignore <<EOF
217
+cat >.gitignore <<EOF
218
ignored
219
ignored.d/*
220
EOF
@@ -224,7 +224,7 @@ test_expect_success 'stash previously ignored file' '
224
git add .gitignore &&
225
git commit -m "Add .gitignore" &&
226
>ignored.d/foo &&
227
- echo "!ignored.d/foo" >> .gitignore &&
227
+ echo "!ignored.d/foo" >>.gitignore &&
228
git stash save --include-untracked &&
229
test_path_is_missing ignored.d/foo &&
230
git stash pop &&