GNU bug report logs - #38688
27.0.50; vc-dir + tramp hangs when there are stashes

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Fri, 20 Dec 2019 14:55:02 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #9 received at 38688 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 38688 <at> debbugs.gnu.org
Subject: Re: bug#38688: 27.0.50; vc-dir + tramp hangs when there are stashes
Date: Fri, 10 Jan 2020 16:40:16 +0100
[Message part 1 (text/plain, inline)]
>>>>> On Fri, 20 Dec 2019 17:50:50 +0200, Dmitry Gutov <dgutov <at> yandex.ru> said:

    Dmitry> On 20.12.2019 16:53, Robert Pluim wrote:
    >> When visiting a remote git repo using tramp, if you subsequently run
    >> 'vc-dir', then emacs will hang forever if the remote repo has
    >> stashes. This turned out to be to me having
    >> pager = less -FRXI
    >> in my remote .gitconfig. Unsetting that fixes it, but vc-git should
    >> perhaps take care to run git with '--no-pager' (it already does
    >> something similar in 'vc-git-command').

    Dmitry> Thanks for the report.

    Dmitry> We can probably remove the "PAGER=" variable binding from that fuction
    Dmitry> as well.

True. The attached works for me. emacs-27 or master?

[0001-vc-dir-ensure-we-don-t-use-a-pager-with-git.patch (text/x-patch, inline)]
From 09d1602de858ad1ce46a993fca20e1b573599fa9 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Fri, 10 Jan 2020 16:36:57 +0100
Subject: [PATCH] vc-dir: ensure we don't use a pager with git
To: emacs-devel <at> gnu.org

* lisp/vc/vc-git.el (vc-git--call): Call git with '--no-pager' to
avoid hangs caused by remote pager settings (Bug#38688).
---
 lisp/vc/vc-git.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 000d860e83..61e6c642d1 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1785,13 +1785,12 @@ vc-git--call
 	(process-environment
 	 (append
 	  `("GIT_DIR"
-	    "PAGER="
 	    ;; Avoid repository locking during background operations
 	    ;; (bug#21559).
 	    ,@(when revert-buffer-in-progress-p
 		'("GIT_OPTIONAL_LOCKS=0")))
 	  process-environment)))
-    (apply 'process-file vc-git-program nil buffer nil command args)))
+    (apply 'process-file vc-git-program nil buffer nil "--no-pager" command args)))
 
 (defun vc-git--out-ok (command &rest args)
   (zerop (apply 'vc-git--call '(t nil) command args)))
-- 
2.24.0.155.gd9f6f3b619


This bug report was last modified 5 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.