threads / patch / 43493

patchrepacked packs should be read-only

Subject: [PATCH] repacked packs should be read-only

## tl;dr

One message between Dec 13, 2006 and Dec 13, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Nicolas Pitre· Dec 13, 2006, 21:25 UTC · lore
... just like the other pack creating tools do.
Signed-off-by: Nicolas Pitre <nico@cam.org>
---
Show changes to git-repack.sh +2 −0
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."

← back to recent threads