diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2014-08-03 03:02:03 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-08-04 11:39:11 -0700 |
commit | 10f343ea814f5c18a0913997904ee11cd9b7da24 (patch) | |
tree | 9152810c20e2c9a5453f2c69c35904826030be55 /t/t5004-archive-corner-cases.sh | |
parent | e6aaa393478bf3ee9f4cde8d82cd258c034cd335 (diff) | |
download | git-10f343ea814f5c18a0913997904ee11cd9b7da24.tar.gz |
archive: honor tar.umask even for pax headersbc/archive-pax-header-mode
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-x | t/t5004-archive-corner-cases.sh | 5 |
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 |