Some versions of touch (such as /usr/ucb/touch on Solaris)
do not know about the "-r" option. This would make sense as
a feature of test-chmtime, but fortunately this fix is even
easier. The test does not care about the timestamp of the
.keep file it creates at all, only that it exists. So we can
simply drop the use of "-r".

Signed-off-by: Jeff King <>
 t/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/ b/t/
index d954b84..f9f9014 100755
--- a/t/
+++ b/t/
@@ -17,7 +17,7 @@ test_expect_success 'objects in packs marked .keep are not 
repacked' '
        # The second pack will contain the excluded object
        packsha1=$(git rev-list --objects --all | grep file2 |
                git pack-objects pack) &&
-       touch -r pack-$packsha1.pack pack-$packsha1.keep &&
+       touch pack-$packsha1.keep &&
        objsha1=$(git verify-pack -v pack-$packsha1.idx | head -n 1 |
                sed -e "s/^\([0-9a-f]\{40\}\).*/\1/") &&
        mv pack-* .git/objects/pack/ &&
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to