diff options
author | Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> | 2018-04-07 01:19:47 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-09 11:33:19 +0900 |
commit | decf711fc13858087c87808e539d75f06bd9f7b7 (patch) | |
tree | 31263ba8cb7a473cc660e084260ee504cccd92a8 /t/t6501-freshen-objects.sh | |
parent | d32eb83c1db7d0a8bb54fe743c6d1dd674d372c5 (diff) | |
download | git-decf711fc13858087c87808e539d75f06bd9f7b7.tar.gz |
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/t6501-freshen-objects.sh')
-rwxr-xr-x | t/t6501-freshen-objects.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/t/t6501-freshen-objects.sh b/t/t6501-freshen-objects.sh index 394b169ead..fa12bba985 100755 --- a/t/t6501-freshen-objects.sh +++ b/t/t6501-freshen-objects.sh @@ -72,8 +72,7 @@ for repack in '' true; do ' test_expect_success "simulate time passing ($title)" ' - find .git/objects -type f | - xargs test-chmtime -v -86400 + test-chmtime --get -86400 $(find .git/objects -type f) ' test_expect_success "start writing new commit with old blob ($title)" ' @@ -103,8 +102,7 @@ for repack in '' true; do test_expect_success "abandon objects again ($title)" ' git reset --hard HEAD^ && - find .git/objects -type f | - xargs test-chmtime -v -86400 + test-chmtime --get -86400 $(find .git/objects -type f) ' test_expect_success "start writing new commit with same tree ($title)" ' |