Skip to content

Commit

Permalink
fix issue where untracked (new) files were not inluded in diff
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Nov 10, 2015
1 parent 375c5fe commit c8ede1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -44,7 +46,6 @@ func main() {
}
}

out, code := git.Exec(flag.Args()...)
fmt.Print(out)
os.Exit(code)
}

0 comments on commit c8ede1f

Please sign in to comment.