Skip to content

Commit 32b7385

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d6ab8b1 commit 32b7385

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

t/t3905-stash-include-untracked.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ test_description='Test git stash --include-untracked'
88
. ./test-lib.sh
99

1010
test_expect_success 'stash save --include-untracked some dirty working directory' '
11-
echo 1 > file &&
11+
echo 1 >file &&
1212
git add file &&
1313
test_tick &&
1414
git commit -m initial &&
15-
echo 2 > file &&
15+
echo 2 >file &&
1616
git add file &&
17-
echo 3 > file &&
17+
echo 3 >file &&
1818
test_tick &&
19-
echo 1 > file2 &&
20-
echo 1 > HEAD &&
19+
echo 1 >file2 &&
20+
echo 1 >HEAD &&
2121
mkdir untracked &&
2222
echo untracked >untracked/untracked &&
2323
git stash --include-untracked &&
2424
git diff-files --quiet &&
2525
git diff-index --cached --quiet HEAD
2626
'
2727

28-
cat > expect <<EOF
28+
cat >expect <<EOF
2929
?? actual
3030
?? expect
3131
EOF
@@ -37,7 +37,7 @@ test_expect_success 'stash save --include-untracked cleaned the untracked files'
3737

3838
tracked=$(git rev-parse --short $(echo 1 | git hash-object --stdin))
3939
untracked=$(git rev-parse --short $(echo untracked | git hash-object --stdin))
40-
cat > expect.diff <<EOF
40+
cat >expect.diff <<EOF
4141
diff --git a/HEAD b/HEAD
4242
new file mode 100644
4343
index 0000000..$tracked
@@ -60,7 +60,7 @@ index 0000000..$untracked
6060
@@ -0,0 +1 @@
6161
+untracked
6262
EOF
63-
cat > expect.lstree <<EOF
63+
cat >expect.lstree <<EOF
6464
HEAD
6565
file2
6666
untracked
@@ -85,7 +85,7 @@ test_expect_success 'stash save --patch --all fails' '
8585

8686
git clean --force --quiet
8787

88-
cat > expect <<EOF
88+
cat >expect <<EOF
8989
M file
9090
?? HEAD
9191
?? actual
@@ -105,14 +105,14 @@ test_expect_success 'stash pop after save --include-untracked leaves files untra
105105
git clean --force --quiet -d
106106

107107
test_expect_success 'stash save -u dirty index' '
108-
echo 4 > file3 &&
108+
echo 4 >file3 &&
109109
git add file3 &&
110110
test_tick &&
111111
git stash -u
112112
'
113113

114114
blob=$(git rev-parse --short $(echo 4 | git hash-object --stdin))
115-
cat > expect <<EOF
115+
cat >expect <<EOF
116116
diff --git a/file3 b/file3
117117
new file mode 100644
118118
index 0000000..$blob
@@ -128,20 +128,20 @@ test_expect_success 'stash save --include-untracked dirty index got stashed' '
128128
test_cmp expect actual
129129
'
130130

131-
git reset > /dev/null
131+
git reset >/dev/null
132132

133133
# Must direct output somewhere where it won't be considered an untracked file
134134
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 &&
137137
test_line_count = 0 .git/stash-output.out &&
138138
rm -f .git/stash-output.out
139139
'
140140

141141
test_expect_success 'stash save --include-untracked removed files' '
142142
rm -f file &&
143143
git stash save --include-untracked &&
144-
echo 1 > expect &&
144+
echo 1 >expect &&
145145
test_cmp expect file
146146
'
147147

@@ -152,14 +152,14 @@ test_expect_success 'stash save --include-untracked removed files got stashed' '
152152
test_path_is_missing file
153153
'
154154

155-
cat > .gitignore <<EOF
155+
cat >.gitignore <<EOF
156156
.gitignore
157157
ignored
158158
ignored.d/
159159
EOF
160160

161161
test_expect_success 'stash save --include-untracked respects .gitignore' '
162-
echo ignored > ignored &&
162+
echo ignored >ignored &&
163163
mkdir ignored.d &&
164164
echo ignored >ignored.d/untracked &&
165165
git stash -u &&
@@ -169,7 +169,7 @@ test_expect_success 'stash save --include-untracked respects .gitignore' '
169169
'
170170

171171
test_expect_success 'stash save -u can stash with only untracked files different' '
172-
echo 4 > file4 &&
172+
echo 4 >file4 &&
173173
git stash -u &&
174174
test_path_is_missing file4
175175
'
@@ -214,7 +214,7 @@ test_expect_success 'stash push with $IFS character' '
214214
test_path_is_file bar
215215
'
216216

217-
cat > .gitignore <<EOF
217+
cat >.gitignore <<EOF
218218
ignored
219219
ignored.d/*
220220
EOF
@@ -224,7 +224,7 @@ test_expect_success 'stash previously ignored file' '
224224
git add .gitignore &&
225225
git commit -m "Add .gitignore" &&
226226
>ignored.d/foo &&
227-
echo "!ignored.d/foo" >> .gitignore &&
227+
echo "!ignored.d/foo" >>.gitignore &&
228228
git stash save --include-untracked &&
229229
test_path_is_missing ignored.d/foo &&
230230
git stash pop &&

0 commit comments

Comments
 (0)