repacked packs should be read-only
authorNicolas Pitre <nico@cam.org>
Wed, 13 Dec 2006 21:25:26 +0000 (16:25 -0500)
committerJunio C Hamano <junkio@cox.net>
Wed, 13 Dec 2006 22:18:16 +0000 (14:18 -0800)
... just like the other pack creating tools do.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-repack.sh

index f150a558ca7a7a659f4eb88be3a275e1a4e87337..067898f1207736732c2c80eabbef5537f8dfef69 100755 (executable)
@@ -67,6 +67,8 @@ name=$(git-pack-objects --non-empty --all $args </dev/null "$PACKTMP") ||
 if [ -z "$name" ]; then
        echo Nothing new to pack.
 else
+       chmod a-w "$PACKTMP-$name.pack"
+       chmod a-w "$PACKTMP-$name.idx"
        if test "$quiet" != '-q'; then
            echo "Pack pack-$name created."
        fi