Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit affb4f6

Browse files
authored
Merge pull request #2000 from benesch/preserve-dotgit
Fix bug in preservation of vendor/.git
2 parents 6b79ccc + 880e871 commit affb4f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

txn_writer.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,8 @@ func (dw *DeltaWriter) Write(path string, sm gps.SourceManager, examples bool, l
668668

669669
// Ensure vendor/.git is preserved if present
670670
if hasDotGit(vpath) {
671-
err = fs.RenameWithFallback(filepath.Join(vpath, ".git"), filepath.Join(vnewpath, "vendor/.git"))
672-
if _, ok := err.(*os.LinkError); ok {
671+
err = fs.RenameWithFallback(filepath.Join(vpath, ".git"), filepath.Join(vnewpath, ".git"))
672+
if err != nil {
673673
return errors.Wrap(err, "failed to preserve vendor/.git")
674674
}
675675
}

0 commit comments

Comments
 (0)