fork of go-git with some jj specific features

plumbing: format, Handle case where fs.Join breaks with C: in Windows

Signed-off-by: Paulo Gomes <pjbgf@linux.com>

+10 -1
+10 -1
plumbing/format/gitattributes/dir.go
··· 2 2 3 3 import ( 4 4 "os" 5 + "path/filepath" 6 + "strings" 5 7 6 8 "github.com/go-git/go-billy/v5" 7 9 ··· 59 61 continue 60 62 } 61 63 62 - path := append(root, fi.Name()) 64 + p := fi.Name() 65 + 66 + // Handles the case whereby just the volume name ("C:") is appended, 67 + // to root. Change it to "C:\", which is better handled by fs.Join(). 68 + if filepath.VolumeName(p) != "" && !strings.HasSuffix(p, string(filepath.Separator)) { 69 + p = p + string(filepath.Separator) 70 + } 71 + path := append(root, p) 63 72 64 73 dirAttributes, err := ReadAttributesFile(fs, path, gitattributesFile, false) 65 74 if err != nil {