diff options
-rw-r--r-- | main.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -71,8 +71,12 @@ func main() { log.Fatal("--path option is incompatible with the --work-tree and --git-dir options") } - workTree = repoPath - gitDir = filepath.Join(repoPath, ".git") + absRepoPath, err := filepath.Abs(repoPath) + if err != nil { + log.Fatal(err) + } + workTree = absRepoPath + gitDir = filepath.Join(absRepoPath, ".git") } if customConfig != "" { |