Skip to content

Commit d2ecddc

Browse files
Shubhamlmpgitster
authored andcommitted
t7001: use '>' rather than 'touch'
Use `>` rather than `touch` to create an empty file when the timestamp isn't relevant to the test. Signed-off-by: Shubham Verma <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 368d278 commit d2ecddc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/t7001-mv.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ test_expect_success 'checking -k on non-existing file' '
4949
'
5050

5151
test_expect_success 'checking -k on untracked file' '
52-
touch untracked1 &&
52+
>untracked1 &&
5353
git mv -k untracked1 path0 &&
5454
test -f untracked1 &&
5555
test ! -f path0/untracked1
5656
'
5757

5858
test_expect_success 'checking -k on multiple untracked files' '
59-
touch untracked2 &&
59+
>untracked2 &&
6060
git mv -k untracked1 untracked2 path0 &&
6161
test -f untracked1 &&
6262
test -f untracked2 &&
@@ -65,7 +65,7 @@ test_expect_success 'checking -k on multiple untracked files' '
6565
'
6666

6767
test_expect_success 'checking -f on untracked file with existing target' '
68-
touch path0/untracked1 &&
68+
>path0/untracked1 &&
6969
test_must_fail git mv -f untracked1 path0 &&
7070
test ! -f .git/index.lock &&
7171
test -f untracked1 &&
@@ -488,15 +488,15 @@ test_expect_success 'moving nested submodules' '
488488
mkdir sub_nested_nested &&
489489
(
490490
cd sub_nested_nested &&
491-
touch nested_level2 &&
491+
>nested_level2 &&
492492
git init &&
493493
git add . &&
494494
git commit -m "nested level 2"
495495
) &&
496496
mkdir sub_nested &&
497497
(
498498
cd sub_nested &&
499-
touch nested_level1 &&
499+
>nested_level1 &&
500500
git init &&
501501
git add . &&
502502
git commit -m "nested level 1" &&

0 commit comments

Comments
 (0)