Skip to content

Commit 2fe2b41

Browse files
committed
Fix lfsconfig path
- when calling git push
1 parent 5a9dbee commit 2fe2b41

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/git-remote-gitopia/gitopia.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ func (h *GitopiaHandler) List(remote *core.Remote, forPush bool) ([]string, erro
122122

123123
out = append(out, fmt.Sprintf("@refs/heads/%s HEAD", h.remoteRepository.DefaultBranch))
124124

125-
dir := os.Getenv("GIT_DIR")
126-
if strings.HasSuffix(dir, "/.git") {
127-
dir = strings.TrimSuffix(dir, "/.git")
128-
}
129-
125+
dir := path.Dir(os.Getenv("GIT_DIR"))
130126
lfsConfigPath := path.Join(dir, ".lfsconfig")
131127
if _, err := os.Stat(lfsConfigPath); os.IsNotExist(err) {
132128
lfsURL := fmt.Sprintf("%v/%v.git", config.GitServerHost, h.remoteRepository.Id)

0 commit comments

Comments
 (0)