Skip to content

Commit

Permalink
Merge pull request #37 from eagletmt/import-accept-flags
Browse files Browse the repository at this point in the history
import: Accept the same clone flags with get command
  • Loading branch information
motemen committed Sep 23, 2014
2 parents 3a47e08 + 1e311fe commit cbc17c9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ var Commands = []cli.Command{
commandRoot,
}

var cloneFlags = []cli.Flag{
cli.BoolFlag{Name: "update, u", Usage: "Update local repository if cloned already"},
cli.BoolFlag{Name: "p", Usage: "Clone with SSH"},
cli.BoolFlag{Name: "shallow", Usage: "Do a shallow clone"},
}

var commandGet = cli.Command{
Name: "get",
Usage: "Clone/sync with a remote repository",
Expand All @@ -31,11 +37,7 @@ var commandGet = cli.Command{
When you use '-p' option, the repository is cloned via SSH.
`,
Action: doGet,
Flags: []cli.Flag{
cli.BoolFlag{Name: "update, u", Usage: "Update local repository if cloned already"},
cli.BoolFlag{Name: "p", Usage: "Clone with SSH"},
cli.BoolFlag{Name: "shallow", Usage: "Do a shallow clone"},
},
Flags: cloneFlags,
}

var commandList = cli.Command{
Expand Down Expand Up @@ -69,6 +71,7 @@ var commandImport = cli.Command{
Name: "import",
Usage: "Bulk get repositories from a file or stdin",
Action: doImport,
Flags: cloneFlags,
}

var commandRoot = cli.Command{
Expand Down

0 comments on commit cbc17c9

Please sign in to comment.