git-svn: use git-log rather than rev-list | xargs cat-file
[gitweb.git] / t / t5000-tar-tree.sh
index b4359df795483691e61452366add69a212347723..a6c5bf6ab4c32b123bd7d678d7bd3c5cef6f5cb0 100755 (executable)
@@ -49,9 +49,17 @@ test_expect_success \
      git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
      git-commit-tree $treeid </dev/null)'
 
+test_expect_success \
+    'git-archive' \
+    'git-archive HEAD >b.tar'
+
 test_expect_success \
     'git-tar-tree' \
-    'git-tar-tree HEAD >b.tar'
+    'git-tar-tree HEAD >b2.tar'
+
+test_expect_success \
+    'git-archive vs. git-tar-tree' \
+    'diff b.tar b2.tar'
 
 test_expect_success \
     'validate file modification time' \
@@ -100,6 +108,13 @@ test_expect_success \
     'git-archive --format=zip' \
     'git-archive --format=zip HEAD >d.zip'
 
+$UNZIP -v >/dev/null 2>&1
+if [ $? -eq 127 ]; then
+       echo "Skipping ZIP tests, because unzip was not found"
+       test_done
+       exit
+fi
+
 test_expect_success \
     'extract ZIP archive' \
     '(mkdir d && cd d && $UNZIP ../d.zip)'