aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2020-05-26 23:30:22 +0200
committerMartin Polden <mpolden@mpolden.no>2020-05-26 23:30:22 +0200
commita943e0260fdb1753180c79ef88a6a4c893fd2501 (patch)
treef28f9e81a9608ef84c5e01d16569e74f223abcc7
parentb19084a3623aa8392bd22a0699e430bea1a571c2 (diff)
Remove unused option
-rw-r--r--git/git.go4
-rw-r--r--main.go3
2 files changed, 3 insertions, 4 deletions
diff --git a/git/git.go b/git/git.go
index a24a787..2ddbe81 100644
--- a/git/git.go
+++ b/git/git.go
@@ -11,8 +11,8 @@ type Git struct {
inheritIO bool
}
-func New(path string, inheritIO bool) (*Git, error) {
- p, err := exec.LookPath(path)
+func New(inheritIO bool) (*Git, error) {
+ p, err := exec.LookPath("git")
if err != nil {
return nil, err
}
diff --git a/main.go b/main.go
index 814a4cb..c478999 100644
--- a/main.go
+++ b/main.go
@@ -16,7 +16,6 @@ import (
)
type CLI struct {
- GitPath string `short:"g" long:"git" description:"Path to git executable" value-name:"PATH" default:"git"`
Quiet bool `short:"q" long:"quiet" description:"Only print errors"`
Dryrun bool `short:"n" long:"dryrun" description:"Print commands that would be run and exit"`
Protocol string `short:"p" long:"protocol" description:"Use the given protocol when mirroring" choice:"ssh" choice:"https" choice:"git" default:"ssh"`
@@ -98,7 +97,7 @@ func main() {
log.Fatal(err)
}
- g, err := git.New(cli.GitPath, !cli.Quiet)
+ g, err := git.New(!cli.Quiet)
if err != nil {
log.Fatal(err)
}