# [PATCH] repacked packs should be read-only

1 messages from 2006-12-13 to 2006-12-13. Participants: Nicolas Pitre.
Thread: https://gitlist.dev/t/43493

## Nicolas Pitre, 2006-12-13 21:25

Subject: [PATCH] repacked packs should be read-only
Message-ID: <Pine.LNX.4.64.0612131620280.18171@xanadu.home>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0612131620280.18171%40xanadu.home

```
... just like the other pack creating tools do.

Signed-off-by: Nicolas Pitre <nico@cam.org>

---

diff --git a/git-repack.sh b/git-repack.sh
index f150a55..067898f 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -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."

```
