Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>2018-04-07 01:19:47 +0300
committerJunio C Hamano <gitster@pobox.com>2018-04-09 05:33:19 +0300
commitdecf711fc13858087c87808e539d75f06bd9f7b7 (patch)
tree31263ba8cb7a473cc660e084260ee504cccd92a8 /t/t7701-repack-unpack-unreachable.sh
parentd32eb83c1db7d0a8bb54fe743c6d1dd674d372c5 (diff)
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/t7701-repack-unpack-unreachable.sh')
-rwxr-xr-xt/t7701-repack-unpack-unreachable.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh
index 987573c41f..47f22555f1 100755
--- a/t/t7701-repack-unpack-unreachable.sh
+++ b/t/t7701-repack-unpack-unreachable.sh
@@ -55,8 +55,8 @@ test_expect_success '-A with -d option leaves unreachable objects unpacked' '
compare_mtimes ()
{
- read tref rest &&
- while read t rest; do
+ read tref &&
+ while read t; do
test "$tref" = "$t" || return 1
done
}
@@ -90,7 +90,7 @@ test_expect_success 'unpacked objects receive timestamp of pack file' '
tmppack=".git/objects/pack/tmp_pack" &&
ln "$packfile" "$tmppack" &&
git repack -A -l -d &&
- test-chmtime -v +0 "$tmppack" "$fsha1path" "$csha1path" "$tsha1path" \
+ test-chmtime --get "$tmppack" "$fsha1path" "$csha1path" "$tsha1path" \
> mtimes &&
compare_mtimes < mtimes
'