summaryrefslogtreecommitdiff
path: root/t/t5000-tar-tree.sh
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-05-20 09:58:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-20 22:31:45 (GMT)
commit1355241bf58b325ec9bedc2768d28dd20355c50e (patch)
tree52e48a5d9186fd9a6f949776f89d18f46d9a026d /t/t5000-tar-tree.sh
parentc420df7b9bbfcf352a3602c78e8476f18098bb43 (diff)
downloadgit-1355241bf58b325ec9bedc2768d28dd20355c50e.zip
git-1355241bf58b325ec9bedc2768d28dd20355c50e.tar.gz
git-1355241bf58b325ec9bedc2768d28dd20355c50e.tar.bz2
t5000, t5003: create directories for extracted files lazily
Create the directories b and c just before they are needed instead of up front. For t5003 it turns out we don't need them at all. For t5000 it makes the coming modifications easier. Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-xt/t5000-tar-tree.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh
index 68b5698..41cd609 100755
--- a/t/t5000-tar-tree.sh
+++ b/t/t5000-tar-tree.sh
@@ -32,7 +32,7 @@ SUBSTFORMAT=%H%n
test_expect_success \
'populate workdir' \
- 'mkdir a b c &&
+ 'mkdir a &&
echo simple textfile >a/a &&
mkdir a/bin &&
cp /bin/sh a/bin &&
@@ -126,7 +126,7 @@ test_expect_success \
test_expect_success \
'extract tar archive' \
- '(cd b && "$TAR" xf -) <b.tar'
+ '(mkdir b && cd b && "$TAR" xf -) <b.tar'
test_expect_success \
'validate filenames' \
@@ -143,7 +143,7 @@ test_expect_success \
test_expect_success \
'extract tar archive with prefix' \
- '(cd c && "$TAR" xf -) <c.tar'
+ '(mkdir c && cd c && "$TAR" xf -) <c.tar'
test_expect_success \
'validate filenames with prefix' \