diff --git a/main.go b/main.go index aabdc0d..3e12a49 100644 --- a/main.go +++ b/main.go @@ -22,8 +22,10 @@ func main() { hound := &Hound{Config: *config} git := &Command{Bin: *bin} + out, code := git.Exec(flag.Args()...) + if _, ok := hound.New(); ok { - out, _ := git.Exec("diff", "-U0") + out, _ := git.Exec("diff", "-U0", "--staged") fileDiffs, err := diff.ParseMultiFileDiff([]byte(out)) if err != nil { fmt.Print(err) @@ -44,7 +46,6 @@ func main() { } } - out, code := git.Exec(flag.Args()...) fmt.Print(out) os.Exit(code) }