GNU bug report logs -
#21559
25.0.50; auto-revert-mode breaks git rebase
Previous Next
Reported by: Ben Gamari <ben <at> smart-cactus.org>
Date: Fri, 25 Sep 2015 14:31:02 UTC
Severity: normal
Found in version 25.0.50
Fixed in version 27.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #107 received at 21559 <at> debbugs.gnu.org (full text, mbox):
On 2/15/18 9:08 PM, Alexei Khlebnikov wrote:
> Judging from the comment of the commit implementing the
> "--no-optional-locks" switch,
>
> https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee3
>
> , the switch was implemented exactly for background refresh in "tools
> like IDEs or fancy editors".
> I.e. for mitigating this particular bug! Now we only have to use this
> switch in our "fancy editor".
OK, here's my question: what is a "background refresh"? Must be consider
every VC operation to be "background"?
From what I see of this switch's description, it's going to (slightly?
imperceptibly?) slow down the VC operations. It would be cool to see
some measurement of that effect.
Failing that, why don't we try something else first? If the problem
occurs solely due to auto-revert-mode's calls to Git, let's try adding
that environment variable binding inside auto-revert-handler. The patch
is below. Does it solve the problem as well?
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index cf145e0ee3..41e9f00049 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -709,7 +709,9 @@ auto-revert-handler
;; `preserve-modes' avoids changing the (minor) modes. But we do
;; want to reset the mode for VC, so we do it manually.
(when (or revert auto-revert-check-vc-info)
- (vc-refresh-state))))
+ (let ((process-environment
+ (cons "GIT_OPTIONAL_LOCKS=0" process-environment)))
+ (vc-refresh-state)))))
(defun auto-revert-tail-handler (size)
(let ((modified (buffer-modified-p))
This bug report was last modified 6 years and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.