Skip to content

Commit 657a395

Browse files
committed
Write packed-refs with 0644 permissions
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
1 parent 718eb4b commit 657a395

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/refs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#define MAX_NESTING_LEVEL 5
1818

19+
#define GIT_PACKED_REFS_FILE_MODE 0644
20+
1921
enum {
2022
GIT_PACKREF_HAS_PEEL = 1,
2123
GIT_PACKREF_WAS_LOOSE = 2
@@ -802,7 +804,7 @@ static int packed_write(git_repository *repo)
802804
/* if we've written all the references properly, we can commit
803805
* the packfile to make the changes effective */
804806
if (error == GIT_SUCCESS) {
805-
error = git_filebuf_commit(&pack_file, GIT_PACK_FILE_MODE);
807+
error = git_filebuf_commit(&pack_file, GIT_PACKED_REFS_FILE_MODE);
806808

807809
/* when and only when the packfile has been properly written,
808810
* we can go ahead and remove the loose refs */

0 commit comments

Comments
 (0)