Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Apr 8, 2020
1 parent e73eb8b commit ec366b4
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 1,096 deletions.
15 changes: 4 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ var (
func main() {
flaggy.DefaultParser.ShowVersionWithVersionFlag = false

repoPath := "."
flaggy.String(&repoPath, "p", "path", "Path of git repo")

filterPath := ""
flaggy.String(&filterPath, "f", "filter", "Path to filter on in `git log -- <path>`. When in filter mode, the commits, reflog, and stash are filtered based on the given path, and some operations are restricted")

dump := ""
flaggy.AddPositionalValue(&dump, "gitargs", 1, false, "Todo file")
flaggy.DefaultParser.PositionalFlags[0].Hidden = true
packagePath := "."
flaggy.String(&packagePath, "p", "path", "Path of package")

versionFlag := false
flaggy.Bool(&versionFlag, "v", "version", "Print the current version")
Expand All @@ -53,8 +46,8 @@ func main() {
os.Exit(0)
}

if repoPath != "." {
if err := os.Chdir(repoPath); err != nil {
if packagePath != "." {
if err := os.Chdir(packagePath); err != nil {
log.Fatal(err.Error())
}
}
Expand Down
Loading

0 comments on commit ec366b4

Please sign in to comment.