diff options
author | Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> | 2018-04-07 00:19:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-09 04:33:19 +0200 |
commit | decf711fc13858087c87808e539d75f06bd9f7b7 (patch) | |
tree | 31263ba8cb7a473cc660e084260ee504cccd92a8 /t/t2022-checkout-paths.sh | |
parent | Git 2.16.3 (diff) | |
download | git-decf711fc13858087c87808e539d75f06bd9f7b7.tar.xz git-decf711fc13858087c87808e539d75f06bd9f7b7.zip |
t/helper: 'test-chmtime (--get|-g)' to print only the mtime
Compared to 'test-chmtime -v +0 file' which prints the mtime and
and the file name, 'test-chmtime --get file' displays only the mtime.
If it is used in combination with (+|=|=+|=-|-)seconds, it changes
and prints the new value.
test-chmtime -v +0 file | sed 's/[^0-9].*$//'
is now equivalent to:
test-chmtime --get file
Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2022-checkout-paths.sh')
-rwxr-xr-x | t/t2022-checkout-paths.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t2022-checkout-paths.sh b/t/t2022-checkout-paths.sh index f46d0499bc..2a42083bf8 100755 --- a/t/t2022-checkout-paths.sh +++ b/t/t2022-checkout-paths.sh @@ -73,8 +73,8 @@ test_expect_success 'do not touch files that are already up-to-date' ' git checkout HEAD -- file1 file2 && echo one >expect && test_cmp expect file1 && - echo "1000000000 file2" >expect && - test-chmtime -v +0 file2 >actual && + echo "1000000000" >expect && + test-chmtime --get file2 >actual && test_cmp expect actual ' |