{"thread":{"id":"32402","subject":"[PATCH] t9502: do not assume GNU tar","startedAt":"2012-12-19T05:03:13Z","lastAt":"2012-12-19T05:03:13Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"205174","messageId":"7vehimd46m.fsf@alter.siamese.dyndns.org","threadId":"32402","inReplyTo":null,"subject":"[PATCH] t9502: do not assume GNU tar","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-12-19T05:03:13Z","receivedAt":"2012-12-19T05:03:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"The check_snapshot function inspects and makes sure that not cruft\noutside the repository hierarchy is added to the tar archive, by\ninsisting that the output from \"tar tf\" on the resulting archive\ndoes not contain anything that does not begin with \"$prefix/\".\nThere are two issues with this implementation:\n\n - Traditional tar implemenations that do not understand\n   pax_global_header will write it out as if it is a plain file at\n   the top-level;\n\n - Some implementations of tar does not add trailing slash when\n   showing a directory entry (i.e. the output line for the entire\n   archive will show \"$prefix\", not \"$prefix/\").\n\nFix them so that what we want to validate can be tested with\ntraditional tar implementations.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t9502-gitweb-standalone-parse-output.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t9502-gitweb-standalone-parse-output.sh b/t/t9502-gitweb-standalone-parse-output.sh\nindex 731e64c..c662298 100755\n--- a/t/t9502-gitweb-standalone-parse-output.sh\n+++ b/t/t9502-gitweb-standalone-parse-output.sh\n@@ -40,7 +40,7 @@ check_snapshot () {\n \techo \"basename=$basename\"\n \tgrep \"filename=.*$basename.tar\" gitweb.headers >/dev/null 2>&1 &&\n \t\"$TAR\" tf gitweb.body >file_list &&\n-\t! grep -v \"^$prefix/\" file_list\n+\t! grep -v -e \"^$prefix$\" -e \"^$prefix/\" -e \"^pax_global_header$\" file_list\n }\n \n test_expect_success setup '\n-- \n1.8.1.rc2.196.g90926c8\n"}]}