mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 22:39:38 +00:00
Write packed-refs with 0644 permissions
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
This commit is contained in:
parent
718eb4b8ae
commit
657a395186
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#define MAX_NESTING_LEVEL 5
|
#define MAX_NESTING_LEVEL 5
|
||||||
|
|
||||||
|
#define GIT_PACKED_REFS_FILE_MODE 0644
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GIT_PACKREF_HAS_PEEL = 1,
|
GIT_PACKREF_HAS_PEEL = 1,
|
||||||
GIT_PACKREF_WAS_LOOSE = 2
|
GIT_PACKREF_WAS_LOOSE = 2
|
||||||
@ -802,7 +804,7 @@ cleanup:
|
|||||||
/* if we've written all the references properly, we can commit
|
/* if we've written all the references properly, we can commit
|
||||||
* the packfile to make the changes effective */
|
* the packfile to make the changes effective */
|
||||||
if (error == GIT_SUCCESS) {
|
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,
|
/* when and only when the packfile has been properly written,
|
||||||
* we can go ahead and remove the loose refs */
|
* we can go ahead and remove the loose refs */
|
||||||
|
Loading…
Reference in New Issue
Block a user