ref-filter: rename the 'strip' option to 'lstrip'
[gitweb.git] / t / t5000-tar-tree.sh
index 96d208da25ef0b1be793b9d6c0e0e5fb72c14489..886b6953e40f9fceae18642ebec031e0bdf511e3 100755 (executable)
@@ -179,6 +179,15 @@ test_expect_success 'git archive --remote' \
     'git archive --remote=. HEAD >b5.tar &&
     test_cmp_bin b.tar b5.tar'
 
+test_expect_success 'git archive --remote with configured remote' '
+       git config remote.foo.url . &&
+       (
+               cd a &&
+               git archive --remote=foo --output=../b5-nick.tar HEAD
+       ) &&
+       test_cmp_bin b.tar b5-nick.tar
+'
+
 test_expect_success \
     'validate file modification time' \
     'mkdir extract &&
@@ -197,9 +206,15 @@ test_expect_success 'git archive with --output, override inferred format' '
        test_cmp_bin b.tar d4.zip
 '
 
-test_expect_success \
-    'git archive --list outside of a git repo' \
-    'GIT_DIR=some/non-existing/directory git archive --list'
+test_expect_success 'git archive --list outside of a git repo' '
+       nongit git archive --list
+'
+
+test_expect_success 'git archive --remote outside of a git repo' '
+       git archive HEAD >expect.tar &&
+       nongit git archive --remote="$PWD" HEAD >actual.tar &&
+       test_cmp_bin expect.tar actual.tar
+'
 
 test_expect_success 'clients cannot access unreachable commits' '
        test_commit unreachable &&
@@ -347,7 +362,7 @@ test_lazy_prereq TAR_HUGE '
        test_cmp expect actual
 '
 
-test_expect_success 'set up repository with huge blob' '
+test_expect_success LONG_IS_64BIT 'set up repository with huge blob' '
        obj_d=19 &&
        obj_f=f9c8273ec45a8938e6999cb59b3ff66739902a &&
        obj=${obj_d}${obj_f} &&
@@ -360,7 +375,7 @@ test_expect_success 'set up repository with huge blob' '
 
 # We expect git to die with SIGPIPE here (otherwise we
 # would generate the whole 64GB).
-test_expect_success 'generate tar with huge size' '
+test_expect_success LONG_IS_64BIT 'generate tar with huge size' '
        {
                git archive HEAD
                echo $? >exit-code
@@ -369,13 +384,13 @@ test_expect_success 'generate tar with huge size' '
        test_cmp expect exit-code
 '
 
-test_expect_success TAR_HUGE 'system tar can read our huge size' '
+test_expect_success TAR_HUGE,LONG_IS_64BIT 'system tar can read our huge size' '
        echo 68719476737 >expect &&
        tar_info huge.tar | cut -d" " -f1 >actual &&
        test_cmp expect actual
 '
 
-test_expect_success 'set up repository with far-future commit' '
+test_expect_success LONG_IS_64BIT 'set up repository with far-future commit' '
        rm -f .git/index &&
        echo content >file &&
        git add file &&
@@ -383,11 +398,11 @@ test_expect_success 'set up repository with far-future commit' '
                git commit -m "tempori parendum"
 '
 
-test_expect_success 'generate tar with future mtime' '
+test_expect_success LONG_IS_64BIT 'generate tar with future mtime' '
        git archive HEAD >future.tar
 '
 
-test_expect_success TAR_HUGE 'system tar can read our future mtime' '
+test_expect_success TAR_HUGE,LONG_IS_64BIT 'system tar can read our future mtime' '
        echo 4147 >expect &&
        tar_info future.tar | cut -d" " -f2 >actual &&
        test_cmp expect actual