t3507: clean up style
Remove space after redirection operators for style. Also, remove a git command which was upstream of a pipe. Finally, let grep and sed open their own input instead of letting the shell redirect the input. Helped-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b510f0beab
commit
5caab8de8a
@ -180,7 +180,7 @@ test_expect_success 'failed cherry-pick registers participants in index' '
|
||||
1 s/ 0 / 1 /
|
||||
2 s/ 0 / 2 /
|
||||
3 s/ 0 / 3 /
|
||||
" < stages > expected &&
|
||||
" stages >expected &&
|
||||
git read-tree -u --reset HEAD &&
|
||||
|
||||
test_must_fail git cherry-pick picked &&
|
||||
@ -246,7 +246,7 @@ test_expect_success 'revert also handles conflicts sanely' '
|
||||
1 s/ 0 / 1 /
|
||||
2 s/ 0 / 2 /
|
||||
3 s/ 0 / 3 /
|
||||
" < stages > expected-stages &&
|
||||
" stages >expected-stages &&
|
||||
git read-tree -u --reset HEAD &&
|
||||
|
||||
head=$(git rev-parse HEAD) &&
|
||||
@ -345,7 +345,7 @@ test_expect_success 'commit after failed cherry-pick does not add duplicated -s'
|
||||
pristine_detach initial &&
|
||||
test_must_fail git cherry-pick -s picked-signed &&
|
||||
git commit -a -s &&
|
||||
test $(git show -s |grep -c "Signed-off-by") = 1
|
||||
test $(git show -s >tmp && grep -c "Signed-off-by" tmp && rm tmp) = 1
|
||||
'
|
||||
|
||||
test_expect_success 'commit after failed cherry-pick adds -s at the right place' '
|
||||
@ -359,7 +359,7 @@ test_expect_success 'commit after failed cherry-pick adds -s at the right place'
|
||||
Signed-off-by: C O Mitter <committer@example.com>
|
||||
# Conflicts:
|
||||
EOF
|
||||
grep -e "^# Conflicts:" -e '^Signed-off-by' <.git/COMMIT_EDITMSG >actual &&
|
||||
grep -e "^# Conflicts:" -e '^Signed-off-by' .git/COMMIT_EDITMSG >actual &&
|
||||
test_cmp expect actual &&
|
||||
|
||||
cat <<-\EOF >expected &&
|
||||
@ -378,7 +378,7 @@ test_expect_success 'commit --amend -s places the sign-off at the right place' '
|
||||
|
||||
# emulate old-style conflicts block
|
||||
mv .git/MERGE_MSG .git/MERGE_MSG+ &&
|
||||
sed -e "/^# Conflicts:/,\$s/^# *//" <.git/MERGE_MSG+ >.git/MERGE_MSG &&
|
||||
sed -e "/^# Conflicts:/,\$s/^# *//" .git/MERGE_MSG+ >.git/MERGE_MSG &&
|
||||
|
||||
git commit -a &&
|
||||
git commit --amend -s &&
|
||||
@ -388,7 +388,7 @@ test_expect_success 'commit --amend -s places the sign-off at the right place' '
|
||||
Signed-off-by: C O Mitter <committer@example.com>
|
||||
Conflicts:
|
||||
EOF
|
||||
grep -e "^Conflicts:" -e '^Signed-off-by' <.git/COMMIT_EDITMSG >actual &&
|
||||
grep -e "^Conflicts:" -e '^Signed-off-by' .git/COMMIT_EDITMSG >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
|
Reference in New Issue
Block a user