Merge branch 'bc/archive-pax-header-mode'
authorJunio C Hamano <gitster@pobox.com>
Tue, 2 Sep 2014 20:27:12 +0000 (13:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Sep 2014 20:27:13 +0000 (13:27 -0700)
Implementations of "tar" that do not understand an extended pax
header would extract the contents of it in a regular file; make
sure the permission bits of this file follows the same tar.umask
configuration setting.

* bc/archive-pax-header-mode:
archive: honor tar.umask even for pax headers

1  2 
t/t5004-archive-corner-cases.sh
index 305bcac6b765111106887d4d24d99657c0554b5b,4461c961a9b78a62f139318b1c74cc777d54f271..83d20c4ba9640fff27777917da0342940c33e0e3
@@@ -45,7 -45,7 +45,7 @@@ test_expect_success HEADER_ONLY_TAR_OK 
  test_expect_success 'tar archive of empty tree is empty' '
        git archive --format=tar HEAD: >empty.tar &&
        perl -e "print \"\\0\" x 10240" >10knuls.tar &&
 -      test_cmp 10knuls.tar empty.tar
 +      test_cmp_bin 10knuls.tar empty.tar
  '
  
  test_expect_success 'tar archive of empty tree with prefix' '
@@@ -113,4 -113,9 +113,9 @@@ test_expect_success 'archive empty subt
        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