Code

Merge branch 'da/submodule-sync'
[git.git] / t / t5000-tar-tree.sh
index 9b0baac8db4b342206d37ab5eaff0b7a09d33967..e395ff4e341bacea21cc5cd909304b7bb4fcb044 100755 (executable)
@@ -25,7 +25,6 @@ commit id embedding:
 '
 
 . ./test-lib.sh
-TAR=${TAR:-tar}
 UNZIP=${UNZIP:-unzip}
 
 SUBSTFORMAT=%H%n
@@ -44,6 +43,11 @@ test_expect_success \
       echo text >file_with_long_path) &&
      (cd a && find .) | sort >a.lst'
 
+test_expect_success \
+    'add ignored file' \
+    'echo ignore me >a/ignored &&
+     echo ignored export-ignore >.gitattributes'
+
 test_expect_success \
     'add files to repository' \
     'find a -type f | xargs git update-index --add &&
@@ -53,6 +57,10 @@ 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 \
+    'remove ignored file' \
+    'rm a/ignored'
+
 test_expect_success \
     'git archive' \
     'git archive HEAD >b.tar'
@@ -68,7 +76,7 @@ test_expect_success \
 test_expect_success \
     'validate file modification time' \
     'mkdir extract &&
-     $TAR xf b.tar -C extract a/a &&
+     "$TAR" xf b.tar -C extract a/a &&
      perl -e '\''print((stat("extract/a/a"))[9], "\n")'\'' >b.mtime &&
      echo "1117231200" >expected.mtime &&
      diff expected.mtime b.mtime'
@@ -80,7 +88,7 @@ test_expect_success \
 
 test_expect_success \
     'extract tar archive' \
-    '(cd b && $TAR xf -) <b.tar'
+    '(cd b && "$TAR" xf -) <b.tar'
 
 test_expect_success \
     'validate filenames' \
@@ -97,7 +105,7 @@ test_expect_success \
 
 test_expect_success \
     'extract tar archive with prefix' \
-    '(cd c && $TAR xf -) <c.tar'
+    '(cd c && "$TAR" xf -) <c.tar'
 
 test_expect_success \
     'validate filenames with prefix' \
@@ -117,7 +125,7 @@ test_expect_success \
 
 test_expect_success \
     'extract substfiles' \
-    '(mkdir f && cd f && $TAR xf -) <f.tar'
+    '(mkdir f && cd f && "$TAR" xf -) <f.tar'
 
 test_expect_success \
      'validate substfile contents' \
@@ -129,7 +137,7 @@ test_expect_success \
 
 test_expect_success \
     'extract substfiles from archive with prefix' \
-    '(mkdir g && cd g && $TAR xf -) <g.tar'
+    '(mkdir g && cd g && "$TAR" xf -) <g.tar'
 
 test_expect_success \
      'validate substfile contents from archive with prefix' \