aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/internal/dotgit/dotgit.go
diff options
context:
space:
mode:
authorJavi Fontan <jfontan@gmail.com>2017-12-22 17:34:20 +0100
committerJavi Fontan <jfontan@gmail.com>2017-12-22 17:35:17 +0100
commitb869eb17b72e80be8e554864db6b6efa6ecb5ebf (patch)
tree42bb0b1af03f2c270891810ca34776a138270dc2 /storage/filesystem/internal/dotgit/dotgit.go
parentd3e7c9060a14ac579f899fd01c936319132cbc97 (diff)
downloadgo-git-b869eb17b72e80be8e554864db6b6efa6ecb5ebf.tar.gz
Add norwfs version of rewritePackedRefsWhileLocked
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'storage/filesystem/internal/dotgit/dotgit.go')
-rw-r--r--storage/filesystem/internal/dotgit/dotgit.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/filesystem/internal/dotgit/dotgit.go b/storage/filesystem/internal/dotgit/dotgit.go
index 643a5d6..fac7aec 100644
--- a/storage/filesystem/internal/dotgit/dotgit.go
+++ b/storage/filesystem/internal/dotgit/dotgit.go
@@ -458,7 +458,10 @@ func (d *DotGit) openAndLockPackedRefs(doCreate bool) (
}
}()
- openFlags := os.O_RDWR
+ // File mode is retrieved from a constant defined in the target specific
+ // files (dotgit_rewrite_packed_refs_*). Some modes are not available
+ // in all filesystems.
+ openFlags := openAndLockPackedRefsMode
if doCreate {
openFlags |= os.O_CREATE
}