all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59158: [PATCH] vc-git: Ensure git doesn't try to colorize stashes
@ 2022-11-09 21:22 Morgan Smith
  2022-11-11 12:44 ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Morgan Smith @ 2022-11-09 21:22 UTC (permalink / raw)
  To: 59158

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-vc-git-Ensure-git-doesn-t-try-to-colorize-stashes.patch --]
[-- Type: text/x-patch, Size: 1008 bytes --]

From 3a5b77c93742ea0ad5ad89d8af3531f18411b88a Mon Sep 17 00:00:00 2001
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Wed, 9 Nov 2022 16:16:55 -0500
Subject: [PATCH] vc-git: Ensure git doesn't try to colorize stashes

* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git flags
---
 lisp/vc/vc-git.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 74536309e2..a1ff03144b 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1883,7 +1883,8 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
   "Show the contents of stash NAME."
   (interactive (list (vc-git-stash-read "Show stash: ")))
   (vc-setup-buffer "*vc-git-stash*")
-  (vc-git-command "*vc-git-stash*" 'async nil "stash" "show" "-p" name)
+  (vc-git-command "*vc-git-stash*" 'async nil
+                  "stash" "show" "--color=never" "-p" name)
   (set-buffer "*vc-git-stash*")
   (setq buffer-read-only t)
   (diff-mode)
-- 
2.38.0


[-- Attachment #2: Type: text/plain, Size: 260 bytes --]


Hello,

So if you've configured git with "git config --global color.ui always"
then "git stash show" will create lots of spurious color escape
characters that our stash viewer code cannot deal with.  This patch
makes sure that doesn't happen

Thanks,

Morgan

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-12 19:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 21:22 bug#59158: [PATCH] vc-git: Ensure git doesn't try to colorize stashes Morgan Smith
2022-11-11 12:44 ` Stefan Kangas
     [not found]   ` <DM5PR03MB3163A214577D525A6F90C9D7C5009@DM5PR03MB3163.namprd03.prod.outlook.com>
2022-11-12  5:00     ` Stefan Kangas
2022-11-12 17:57       ` Juri Linkov
2022-11-12 19:41         ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.