From 657a3951860f07cf26e2accfe2ada6d62ca5a9f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Mon, 7 Nov 2011 20:32:03 +0100 Subject: [PATCH] Write packed-refs with 0644 permissions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Martín Nieto --- src/refs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/refs.c b/src/refs.c index d2650bde6..05f935796 100644 --- a/src/refs.c +++ b/src/refs.c @@ -16,6 +16,8 @@ #define MAX_NESTING_LEVEL 5 +#define GIT_PACKED_REFS_FILE_MODE 0644 + enum { GIT_PACKREF_HAS_PEEL = 1, GIT_PACKREF_WAS_LOOSE = 2 @@ -802,7 +804,7 @@ cleanup: /* if we've written all the references properly, we can commit * the packfile to make the changes effective */ if (error == GIT_SUCCESS) { - error = git_filebuf_commit(&pack_file, GIT_PACK_FILE_MODE); + error = git_filebuf_commit(&pack_file, GIT_PACKED_REFS_FILE_MODE); /* when and only when the packfile has been properly written, * we can go ahead and remove the loose refs */