Răsfoiți Sursa

fix errors when using protect and an external git diff tool (#1318)

Zachary Rice 2 ani în urmă
părinte
comite
870194be13
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      sources/git.go

+ 2 - 2
sources/git.go

@@ -86,9 +86,9 @@ func NewGitLogCmd(source string, logOpts string) (*GitCmd, error) {
 func NewGitDiffCmd(source string, staged bool) (*GitCmd, error) {
 func NewGitDiffCmd(source string, staged bool) (*GitCmd, error) {
 	sourceClean := filepath.Clean(source)
 	sourceClean := filepath.Clean(source)
 	var cmd *exec.Cmd
 	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 {
 	if staged {
-		cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0",
+		cmd = exec.Command("git", "-C", sourceClean, "diff", "-U0", "--no-ext-diff",
 			"--staged", ".")
 			"--staged", ".")
 	}
 	}
 	log.Debug().Msgf("executing: %s", cmd.String())
 	log.Debug().Msgf("executing: %s", cmd.String())