]> arthur.barton.de Git - bup.git/commit
PackWriter: respect umask/sgid/etc. when creating pack/idx
authorRob Browning <rlb@defaultvalue.org>
Fri, 24 Jun 2022 21:36:04 +0000 (16:36 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 1 Jul 2022 19:17:05 +0000 (14:17 -0500)
commitb7c76fdeaaa1f5e5580a6b28a54ced7d99d3178d
tree54fe167586fcd7eee5ee2d05718eec60be9995e0
parent6dee94a429e456888e692910f7bb0d82b1c06d60
PackWriter: respect umask/sgid/etc. when creating pack/idx

Use atomically_replaced_file to ensure that the new packfile and index
respect the current umask, any directory sgid bit, etc., and use an
ExitStack to try to make sure all the corner cases are covered.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/git.py