Skip to content

Commit 1f0cca9

Browse files
authored
fix usage of OS-paths vs Git-paths (#23)
1 parent ce515c9 commit 1f0cca9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/git.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package git
33
import (
44
"context"
55
"fmt"
6-
"path/filepath"
6+
"strings"
77

88
"github.com/go-git/go-git/v5"
99
"github.com/go-git/go-git/v5/plumbing"
@@ -26,7 +26,7 @@ func (b Branch) ReferenceName() plumbing.ReferenceName {
2626
}
2727

2828
func (b Branch) Sub(s string) Branch {
29-
return Branch(filepath.Join(string(b), s))
29+
return Branch(strings.Join([]string{string(b), s}, "/"))
3030
}
3131

3232
type CommitHash string
@@ -50,7 +50,7 @@ func (a Address) Sub(s string) Address {
5050
}
5151

5252
func (a Address) Join(s ns.NS) Address {
53-
return Address{Repo: a.Repo, Branch: a.Branch.Sub(s.Path())}
53+
return Address{Repo: a.Repo, Branch: a.Branch.Sub(s.GitPath())}
5454
}
5555

5656
func (a Address) String() string {

0 commit comments

Comments
 (0)