# \[PATCH\] repacked packs should be read-only

- From: Nicolas Pitre \<hidden\>
- Date: 2016-08-11 19:41:14 
- List: git
- Page: https://ratatoskr.run/git/2016/08/7689274
- Thread: https://ratatoskr.run/git/2016/08/7689274/t.md

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

Signed-off-by: Nicolas Pitre <redacted>

---

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."
```
