Skip to content

Commit 199796e

Browse files
stgit.el: Add "--no-color" flag to 'git log' and 'git show'
Prevents issues for users that force color in their git config.
1 parent e042344 commit 199796e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/stgit.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ using (make-hash-table :test \='equal)."
672672
(commit-abbrev (when (string-match "%-\\([0-9]+\\)n" fmt)
673673
(string-to-number (match-string 1 fmt))))
674674
(exit-status (stgit-run-git-silent "--no-pager" "log"
675+
"--no-color"
675676
"--reverse"
676677
"--pretty=oneline"
677678
nentries
@@ -2427,7 +2428,7 @@ which stage to diff against in the case of unmerged files."
24272428
(if (eq patch-id :index)
24282429
'("--cached")
24292430
(list unmerged-stage))))
2430-
(let ((args (append '("show" "-O" "--patch-with-stat")
2431+
(let ((args (append '("show" "--color=never" "-O" "--patch-with-stat")
24312432
`("-O" ,(stgit-find-copies-harder-diff-arg))
24322433
(and space-arg (list "-O" space-arg))
24332434
(list (stgit-patch-name-at-point)))))

0 commit comments

Comments
 (0)