]> git.proxmox.com Git - libgit2.git/commitdiff
refs: move GIT_PACKED_REFS_FILE_MODE to refs.h as GIT_PACKEDREFS_FILE_MODE
authorBrodie Rao <brodie@bitheap.org>
Wed, 16 Nov 2011 19:39:03 +0000 (11:39 -0800)
committerBrodie Rao <brodie@bitheap.org>
Wed, 16 Nov 2011 19:39:03 +0000 (11:39 -0800)
This groups the #define with the other ref-related file modes, and it
makes the name consistent with the other packed-refs definitions.

src/refs.c
src/refs.h

index 4f32f4400658920ec0bd029073f6675b19f51f92..569efbf7877d73f4b2c54d99eb544b00101ea4f8 100644 (file)
@@ -16,8 +16,6 @@
 
 #define MAX_NESTING_LEVEL 5
 
-#define GIT_PACKED_REFS_FILE_MODE 0666
-
 enum {
        GIT_PACKREF_HAS_PEEL = 1,
        GIT_PACKREF_WAS_LOOSE = 2
@@ -804,7 +802,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_PACKED_REFS_FILE_MODE);
+               error = git_filebuf_commit(&pack_file, GIT_PACKEDREFS_FILE_MODE);
 
                /* when and only when the packfile has been properly written,
                 * we can go ahead and remove the loose refs */
index 02e336e547009db425e9ae9ecf5b1d8208d6b438..c90f5bcc4ee33d15378c4448dae18bcf8dabfc02 100644 (file)
@@ -24,6 +24,7 @@
 #define GIT_SYMREF "ref: "
 #define GIT_PACKEDREFS_FILE "packed-refs"
 #define GIT_PACKEDREFS_HEADER "# pack-refs with: peeled "
+#define GIT_PACKEDREFS_FILE_MODE 0666
 
 #define GIT_HEAD_FILE "HEAD"
 #define GIT_FETCH_HEAD_FILE "FETCH_HEAD"