aboutsummaryrefslogblamecommitdiffstats
path: root/storage/filesystem/dotgit/dotgit_rewrite_packed_refs_nix.go
blob: c7607932148c653304ad12578ec3a8ffd6f43bcf (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                          


              






                                           





                                                               
// +build !windows,!norwfs

package dotgit

import (
	"os"

	"gopkg.in/src-d/go-billy.v4"
)

const openAndLockPackedRefsMode = os.O_RDWR

func (d *DotGit) rewritePackedRefsWhileLocked(
	tmp billy.File, pr billy.File) error {
	// On non-Windows platforms, we can have atomic rename.
	return d.fs.Rename(tmp.Name(), pr.Name())
}