Skip to content

Commit

Permalink
fix errors when using protect and an external git diff tool (#1318)
Browse files Browse the repository at this point in the history
  • Loading branch information
zricethezav committed Dec 23, 2023
1 parent 179c607 commit 870194b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func NewGitLogCmd(source string, logOpts string) (*GitCmd, error) {
func NewGitDiffCmd(source string, staged bool) (*GitCmd, error) {
sourceClean := filepath.Clean(source)
var cmd *exec.Cmd
cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0", ".")
cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0", "--no-ext-diff", ".")
if staged {
cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0",
cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0", "--no-ext-diff",
"--staged", ".")
}
log.Debug().Msgf("executing: %s", cmd.String())
Expand Down

0 comments on commit 870194b

Please sign in to comment.