Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2014-08-03 07:02:03 +0400
committerJunio C Hamano <gitster@pobox.com>2014-08-04 22:39:11 +0400
commit10f343ea814f5c18a0913997904ee11cd9b7da24 (patch)
tree9152810c20e2c9a5453f2c69c35904826030be55 /t/t5004-archive-corner-cases.sh
parente6aaa393478bf3ee9f4cde8d82cd258c034cd335 (diff)
archive: honor tar.umask even for pax headers
git archive's tar format uses extended pax headers to encode metadata into the archive. Most tar implementations correctly treat these as metadata, but some that do not understand the pax format extract these as files instead. Apply the tar.umask setting to these entries to prevent tampering by other users. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5004-archive-corner-cases.sh')
-rwxr-xr-xt/t5004-archive-corner-cases.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh
index 67f3b54bed..4461c961a9 100755
--- a/t/t5004-archive-corner-cases.sh
+++ b/t/t5004-archive-corner-cases.sh
@@ -113,4 +113,9 @@ test_expect_success 'archive empty subtree by direct pathspec' '
check_dir extract sub
'
+test_expect_success 'archive applies umask even for pax headers' '
+ git archive --format=tar HEAD >archive.tar &&
+ ! grep 0666 archive.tar
+'
+
test_done