From b869eb17b72e80be8e554864db6b6efa6ecb5ebf Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 22 Dec 2017 17:34:20 +0100 Subject: Add norwfs version of rewritePackedRefsWhileLocked Signed-off-by: Javi Fontan --- storage/filesystem/internal/dotgit/dotgit.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'storage/filesystem/internal/dotgit/dotgit.go') 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 } -- cgit