summaryrefslogtreecommitdiff
path: root/t/t9502-gitweb-standalone-parse-output.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-12-18 20:57:13 -0800
committerJunio C Hamano <gitster@pobox.com>2012-12-19 07:44:29 -0800
commit2060ed50e76bfc89e2421cffbb56694e9d803593 (patch)
tree67e9f5a54ce4307a15a9be903b62d4deb15a3e4d /t/t9502-gitweb-standalone-parse-output.sh
parent7b90363099e55835885052e7c0512d2af7fdc035 (diff)
downloadgit-2060ed50e76bfc89e2421cffbb56694e9d803593.tar.gz
t9502: do not assume GNU tar
The check_snapshot function makes sure that no cruft outside the repository hierarchy is added to the tar archive. The output from "tar tf" on the resulting archive is inspected to see if there is anything that does not begin with "$prefix/". There are two issues with this implementation: - Traditional tar implemenations that do not understand pax_global_header will write it out as if it is a plain file at the top-level; - Some implementations of tar do not add trailing slash when showing a directory entry (i.e. the output line for the entire archive will show "$prefix", not "$prefix/"). Fix them so that what we want to validate can be tested with traditional tar implementations. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9502-gitweb-standalone-parse-output.sh')
-rwxr-xr-xt/t9502-gitweb-standalone-parse-output.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh
index 3a8e7d3f5a..86dfee2e4f 100755
--- a/t/t9502-gitweb-standalone-parse-output.sh
+++ b/t/t9502-gitweb-standalone-parse-output.sh
@@ -40,7 +40,7 @@ check_snapshot () {
echo "basename=$basename"
grep "filename=.*$basename.tar" gitweb.headers >/dev/null 2>&1 &&
"$TAR" tf gitweb.body >file_list &&
- ! grep -v "^$prefix/" file_list
+ ! grep -v -e "^$prefix$" -e "^$prefix/" -e "^pax_global_header$" file_list
}
test_expect_success setup '