summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-01-05 04:06:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-01-05 08:07:57 (GMT)
commit90ed6c0576156d356aa35ee79aaf85825f9566f6 (patch)
treea87f81fef311efe33a5faf5f9e1c3165e8b30650 /t/t7001-mv.sh
parent7ee906694c28ab7281492d5114d2afabd964bd41 (diff)
downloadgit-90ed6c0576156d356aa35ee79aaf85825f9566f6.zip
git-90ed6c0576156d356aa35ee79aaf85825f9566f6.tar.gz
git-90ed6c0576156d356aa35ee79aaf85825f9566f6.tar.bz2
t/t7001: avoid unnecessary ERE when using grep
As pointed out by Junio, it's unnecessary to use "grep -E" and ".+" when we can just use "grep" and "..*". Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index 8b43fb5..b730c90 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -22,7 +22,7 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/COPYING.+path1/COPYING"'
+ grep "^R100..*path0/COPYING..*path1/COPYING"'
test_expect_success \
'moving the file back into subdirectory' \
@@ -36,7 +36,7 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path1/COPYING.+path0/COPYING"'
+ grep "^R100..*path1/COPYING..*path0/COPYING"'
test_expect_success \
'adding another file' \
@@ -55,9 +55,9 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
+ grep "^R100..*path0/COPYING..*path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path0/README.+path2/README"'
+ grep "^R100..*path0/README..*path2/README"'
test_expect_success \
'succeed when source is a prefix of destination' \
@@ -74,9 +74,9 @@ test_expect_success \
test_expect_success \
'checking the commit' \
'git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
+ grep "^R100..*path2/COPYING..*path1/path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
- grep -E "^R100.+path2/README.+path1/path2/README"'
+ grep "^R100..*path2/README..*path1/path2/README"'
test_expect_failure \
'do not move directory over existing directory' \