From unknown Fri Aug 15 15:34:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21559 <21559@debbugs.gnu.org> To: bug#21559 <21559@debbugs.gnu.org> Subject: Status: 25.0.50; auto-revert-mode breaks git rebase Reply-To: bug#21559 <21559@debbugs.gnu.org> Date: Fri, 15 Aug 2025 22:34:25 +0000 retitle 21559 25.0.50; auto-revert-mode breaks git rebase reassign 21559 emacs submitter 21559 Ben Gamari severity 21559 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 10:30:48 2015 Received: (at submit) by debbugs.gnu.org; 25 Sep 2015 14:30:48 +0000 Received: from localhost ([127.0.0.1]:43187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfU1O-0005qr-E0 for submit@debbugs.gnu.org; Fri, 25 Sep 2015 10:30:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36091) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfSOG-0003OO-Ev for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfSOE-00088l-8w for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSOE-00088h-6x for submit@debbugs.gnu.org; Fri, 25 Sep 2015 08:46:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSOC-0002uA-AN for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfSO9-000858-0t for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:12 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:41563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfSO8-00084T-OV for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 08:46:08 -0400 Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id D13A674944; Fri, 25 Sep 2015 12:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1443184511; bh=fp2G0h4lJf7LE+YGS8fqMT5BSRd4b0NFkRTtKRB1UJ8=; h=From:To:Subject:Date:From; b=pZY5bgD9KJNLM6dhC6J9gPQWp6DHdsvNjCVeYi/4EkQ3c+BFLVD/HSWScF9fz1VEq NOLGGq9Dd/la0ATpaL9FSB0wqyyAJmZFGEOoK1AUIG5gZ/Hh4dVSwKoLMZuWcJ126e 1mBTf/K8BauEQkF36oIe06LpjLuKMWC6GHx1nUZg= From: Ben Gamari To: bug-gnu-emacs@gnu.org Subject: 25.0.50; auto-revert-mode breaks git rebase Date: Fri, 25 Sep 2015 14:45:56 +0200 Message-ID: <87wpvebraz.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 25 Sep 2015 10:30:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) --=-=-= Content-Type: text/plain emacs running with `auto-revert-mode` enabled breaks `git rebase` in repositories where files are open. The problem appears to be that `auto-revert-mode` attempts to refresh version control information with `vc-find-file-hook` on revert events. `vc-find-file-hook` calls out to `git`, taking the repository's index lock. This interferes badly with `git rebase`, which performs many git commands in quick succession. When `auto-revert-mode` is enabled there is a very high chance that the following race will occur, git emacs ---------------------- ----------------------------- 1. git rebase checks out a commit, releases `index.lock` 2. `auto-revert-mode` notices change, firing off a `git` process and taking `index.lock`. 3. git rebase applies patch and attempts to commit. Notices that `index.lock` is taken and fails. 4. emacs' `git` process finishes, releasing lock In the end the user is left with a badly broken rebase process and an error message complaining that `index.lock` exists, which he then goes to confirm and finds no such file as emacs has already released the lock. Arguably `git rebase` should be holding the `index.lock` for the entire duration of the process (or be more resilient to the lock being taken) but sadly this isn't the case. Emacs should behave appropriately to accomodate this behavior. One imperfect workaround would be to instead schedule a worker to call `vc-fine-file-hook` at some point in the future when the repository is more likely to be idle (for instance, when there have been no change events for a second or so). git version 2.5.1 In GNU Emacs 25.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.6) of 2015-08-20 on ben-laptop Windowing system distributor `The X.Org Foundation', version 11.0.11702000 System Description: Debian GNU/Linux testing (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.0/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.0/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.0/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.0/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: elisp-slime-nav-mode: t goto-address-prog-mode: t auto-highlight-symbol-mode: t clean-aindent-mode: t highlight-numbers-mode: t highlight-parentheses-mode: t rainbow-delimiters-mode: t yas-global-mode: t yas-minor-mode: t helm-descbinds-mode: t helm-mode: t shell-dirtrack-mode: t projectile-global-mode: t projectile-mode: t recentf-mode: t winner-mode: t window-numbering-mode: t volatile-highlights-mode: t global-vi-tilde-fringe-mode: t global-undo-tree-mode: t undo-tree-mode: t savehist-mode: t popwin-mode: t global-page-break-lines-mode: t page-break-lines-mode: t Info-breadcrumbs-in-mode-line-mode: t ido-vertical-mode: t flx-ido-mode: t global-evil-surround-mode: t evil-surround-mode: t global-evil-search-highlight-persist: t evil-search-highlight-persist: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-mode: t evil-jumper-mode: t evil-escape-mode: t global-anzu-mode: t anzu-mode: t eval-sexp-fu-flash-mode: t company-mode: t global-hl-line-mode: t xterm-mouse-mode: t global-auto-revert-mode: t evil-leader-mode: t evil-mode: t evil-local-mode: t which-key-mode: t override-global-mode: t spacemacs-additional-leader-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Recent messages: Resetting customization items...done Creating customization setup...done Creating customization items... Creating group... Creating group entries...done Creating customization items ...done Resetting customization items...done Creating customization setup...done Info-mouse-follow-link: Args out of range: 2394 Text is read-only [2 times] Load-path shadows: /home/ben/.emacs.d/elpa/helm-20150923.2134/helm-multi-match hides /home/ben/.emacs.d/elpa/helm-core-20150923.959/helm-multi-match /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-show hides /usr/local/share/emacs/site-lisp/notmuch-show /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-print hides /usr/local/share/emacs/site-lisp/notmuch-print /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-wash hides /usr/local/share/emacs/site-lisp/notmuch-wash /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-jump hides /usr/local/share/emacs/site-lisp/notmuch-jump /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-crypto hides /usr/local/share/emacs/site-lisp/notmuch-crypto /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-hello hides /usr/local/share/emacs/site-lisp/notmuch-hello /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-tree hides /usr/local/share/emacs/site-lisp/notmuch-tree /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch hides /usr/local/share/emacs/site-lisp/notmuch /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-address hides /usr/local/share/emacs/site-lisp/notmuch-address /home/ben/.emacs.d/elpa/notmuch-20150907.527/coolj hides /usr/local/share/emacs/site-lisp/coolj /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-parser hides /usr/local/share/emacs/site-lisp/notmuch-parser /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-lib hides /usr/local/share/emacs/site-lisp/notmuch-lib /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-query hides /usr/local/share/emacs/site-lisp/notmuch-query /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-mua hides /usr/local/share/emacs/site-lisp/notmuch-mua /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-message hides /usr/local/share/emacs/site-lisp/notmuch-message /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-tag hides /usr/local/share/emacs/site-lisp/notmuch-tag /home/ben/.emacs.d/elpa/notmuch-20150907.527/notmuch-maildir-fcc hides /usr/local/share/emacs/site-lisp/notmuch-maildir-fcc /home/ben/.emacs.d/elpa/cmake-mode-20150817.725/cmake-mode hides /usr/share/emacs24/site-lisp/cmake-data/cmake-mode /home/ben/.emacs.d/elpa/cmake-mode-20150817.725/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.0.50/lisp/textmodes/rst /home/ben/.emacs.d/elpa/seq-20150917.1508/seq hides /usr/share/emacs/25.0.50/lisp/emacs-lisp/seq Features: (shadow sort mail-extr warnings emacsbug message rfc822 mml mml-sec mailabbrev gmm-utils mailheader sendmail mail-utils cus-edit cus-start cus-load company-files company-keywords company-etags company-gtags company-template company-dabbrev-code company-dabbrev company-capf elisp-slime-nav goto-addr auto-highlight-symbol clean-aindent-mode highlight-numbers parent-mode highlight-parentheses hideshow rainbow-delimiters yasnippet jka-compr eieio-opt speedbar sb-image ezimage dframe find-func helm-command helm-elisp helm-eval edebug helm-descbinds helm-mode helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec dired-x dired-aux ffap helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info bookmark helm-locate helm-grep helm-regexp helm-plugin helm-external helm-net browse-url xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source gnus-util password-cache url-vars mailcap helm-utils helm-help helm-types helm helm-source eieio-compat helm-multi-match helm-lib dired projectile grep compile ibuf-ext ibuffer recentf tree-widget disp-table server winner window-numbering etags xref project volatile-highlights vi-tilde-fringe undo-tree diff solarized smooth-scrolling smartparens-config saveplace savehist py-yapf powerline powerline-separators color powerline-themes popwin page-break-lines info+ ido-vertical-mode flx-ido flx ido exec-path-from-shell evil-surround evil-search-highlight-persist evil-numbers evil-lisp-state smartparens evil-jumper evil-indent-textobject evil-exchange evil-escape evil-args evil-anzu anzu eval-sexp-fu rx highlight diminish company-web company web-completion-data info tex-site adaptive-wrap hybrid-mode ielm pp comint ansi-color hl-line xt-mouse autorevert filenotify core-evilified-state evil-leader evil evil-integration evil-maps evil-commands evil-command-window evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core evil-common windmove thingatpt rect evil-digraphs evil-vars ring which-key quelpa package-build mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr json lisp-mnt use-package bind-key s ucs-normalize dash wid-edit zenburn-theme core-configuration-layer cl-seq finder-inf core-dotspacemacs ht cl package epg-config eieio byte-opt bytecomp byte-compile cl-extra help-mode easymenu seq cconv eieio-core cl-macs gv core-spacemacs derived edmacro kmacro cl-loaddefs cl-lib core-evilify-keymap core-keybindings easy-mmode core-use-package-ext core-micro-state corelv core-toggle core-fonts-support core-spacemacs-buffer core-funcs core-themes-support advice core-auto-completion core-release-management core-emacs-backports subr-x pcase devhelp time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 854111 669089) (symbols 48 49466 68) (miscs 40 1968 2565) (strings 32 311688 272104) (string-bytes 1 11727672) (vectors 16 64346) (vector-slots 8 1157167 184119) (floats 8 1008 1405) (intervals 56 4139 1183) (buffers 976 26) (heap 1024 129296 66437)) --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWBUIEAAoJEHPt6ejPuu8BuREH/0/wqF5hPmWfEo4vwFnZYJQl PVtauXQYeZNRoOatGK0EveJpWufjjgrowtSzQYtkT3+Cr45G8k3tQayFXvLNRpHT s8SZJciS6PDg8g0DDUCRWkhS3Til0HBHmUh+ms9zIMKTE6ujcQ4PczQiugVZ4pnJ BQRfbHgVYLfMjiHURzYzm5ytXAyiIhK2rdMRQtUdKacqi0DxDWfBIsOIfQbAvGHl TZeo2quFhWUj4KSbENu2QJcHwJ1lhPhHcS/+Yozi1/wgtGHXYe25ETdh6ypKiuK9 lo/UZlbgYSYGaBYAnstp1OKMncA6JokKxwSK+oZEkMtxbBsJnnXPhQIGoVTXZus= =sxDE -----END PGP SIGNATURE----- --==-=-=-- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 03:41:31 2015 Received: (at 21559) by debbugs.gnu.org; 26 Sep 2015 07:41:31 +0000 Received: from localhost ([127.0.0.1]:43933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zfk6s-0007Zn-UJ for submit@debbugs.gnu.org; Sat, 26 Sep 2015 03:41:31 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:35829) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zfk6p-0007Zc-8r for 21559@debbugs.gnu.org; Sat, 26 Sep 2015 03:41:28 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NV900300X953K00@a-mtaout22.012.net.il> for 21559@debbugs.gnu.org; Sat, 26 Sep 2015 10:41:17 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NV9003OTXCT2L10@a-mtaout22.012.net.il>; Sat, 26 Sep 2015 10:41:17 +0300 (IDT) Date: Sat, 26 Sep 2015 10:41:23 +0300 From: Eli Zaretskii Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-reply-to: <87wpvebraz.fsf@smart-cactus.org> X-012-Sender: halo1@inter.net.il To: Ben Gamari Message-id: <83mvw9hbks.fsf@gnu.org> References: <87wpvebraz.fsf@smart-cactus.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ben Gamari > Date: Fri, 25 Sep 2015 14:45:56 +0200 > > One imperfect workaround would be to instead schedule a worker to call > `vc-fine-file-hook` at some point in the future when the repository is > more likely to be idle (for instance, when there have been no change > events for a second or so). But autorevert already does exactly that: it doesn't act on file changes immediately, only once every N seconds. N defaults to 5, perhaps you could try customizing auto-revert-interval to a larger value to see if that solves the problem. In any case, the issue here is that Emacs doesn't know when "the repository is idle". If someone can suggest how to tell that, autorevert could be augmented not to revert VC files while the repository is "busy". From your description I understand that just looking at index.lock is not good enough, since Git releases it more than once in this scenario, while the rebase operation is still on-going. Btw, what is your value of auto-revert-check-vc-info? If it's non-nil, perhaps resetting it to nil will also avoid these problems. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 10:11:35 2015 Received: (at 21559) by debbugs.gnu.org; 28 Sep 2015 14:11:35 +0000 Received: from localhost ([127.0.0.1]:46796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZ9S-0008Gx-FA for submit@debbugs.gnu.org; Mon, 28 Sep 2015 10:11:34 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:40880) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZ9P-0008Go-8l for 21559@debbugs.gnu.org; Mon, 28 Sep 2015 10:11:32 -0400 Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id E813D74CFA; Mon, 28 Sep 2015 14:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1443448830; bh=0Jx5+ZfSpWrXmvGzxINmxt1PIg7P3IOWc2zWLHaC1J0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ci3ESV39j6IAoI5Fc6B7qZB1WgskCqnP5oT6Z2vQi4yljUr8qnFuDVLH1JTWX6FSk chW2JOQTEUgXnT5Z/6KupqSPX9o3JRzNyK4OeEPu3kFKjHBbCTkP/8JBvJQ9H6RBH4 8IFsdv8Z265tyNKmmG/65lbK4M5XPjxfH++A3HMI= From: Ben Gamari To: Eli Zaretskii Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: <83mvw9hbks.fsf@gnu.org> References: <87wpvebraz.fsf@smart-cactus.org> <83mvw9hbks.fsf@gnu.org> User-Agent: Notmuch/0.20.2+73~gd432116 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) Date: Mon, 28 Sep 2015 16:11:16 +0200 Message-ID: <87612uzla3.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Ben Gamari >> Date: Fri, 25 Sep 2015 14:45:56 +0200 >>=20 >> One imperfect workaround would be to instead schedule a worker to call >> `vc-fine-file-hook` at some point in the future when the repository is >> more likely to be idle (for instance, when there have been no change >> events for a second or so). > > But autorevert already does exactly that: it doesn't act on file > changes immediately, only once every N seconds. N defaults to 5, > perhaps you could try customizing auto-revert-interval to a larger > value to see if that solves the problem. > This is not true is auto-revert-use-notify is enabled. If I'm not mistaken, your suggestion amounts to increasing the poll interval. This will never solve the problem, it will only mean that the race has fewer opportunities to pop up. Of course, the same can be said of my suggestion, which only narrows the race window, not remove it altogether (which is sadly not possible without fixing git rebase). As an aside, it came as quite a surprise that autorevert (if I understand the code correctly) still polls even if auto-revert-use-notify is set. It seems to me that this is itself a bug. As a laptop user who often works on battery, I keep tabs on which processes eat CPU time and I have noticed that emacs is consistently behind only firefox and Xorg in CPU time demanded at idle. > In any case, the issue here is that Emacs doesn't know when "the > repository is idle". If someone can suggest how to tell that, > autorevert could be augmented not to revert VC files while the > repository is "busy". From your description I understand that just > looking at index.lock is not good enough, since Git releases it more > than once in this scenario, while the rebase operation is still > on-going. > Right. I threw together a patch [1] implementing the suggestion I presented above. I have yet to rigorously test it but I have yet to experience the issue since starting to use it. > Btw, what is your value of auto-revert-check-vc-info? If it's > non-nil, perhaps resetting it to nil will also avoid these problems. It is nil but this doesn't matter as vc-find-file-hook is called if either auto-revert-check-vc-info or the revert flag are set. Cheers, =2D Ben [1] https://github.com/bgamari/emacs/compare/master...auto-revert-vc-idle --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWCUqEAAoJEHPt6ejPuu8BjmcH/itu1+tEqHE2VuxGasJ+4Ajw kl9z/VMvZYoHDr3Kam10YlJusBalXuh3zp9gLl+KEBb4nTZ3BFRkOMVa7M3sHT6B m8KbhtvgL9Rb88LlB6o7rfsRP+jDnrvOy6gy4krFQbmEfe7sO/IOTLR8gCzJCa9G 9KBptMm9F7RJaMcQBm+W3VpSI7fR1Nvq5Y3LcZ1cmfLaL8NCh/WrGG+HeSiRs3iS fyOVZIbE3jaRyQFXq1PbxdGzkSEtBNWkg0A8rEwcATA5XGLTYEzDgXRp7mH/HLsj Mjk18WjrjAE9lXEsqp9zobGljOVd1Ltm13TJnsxM5DWM8gd7pQ1lNJTu9RfqEZQ= =oXeF -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 10:35:53 2015 Received: (at 21559) by debbugs.gnu.org; 28 Sep 2015 14:35:53 +0000 Received: from localhost ([127.0.0.1]:46811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZWy-0000QA-DX for submit@debbugs.gnu.org; Mon, 28 Sep 2015 10:35:52 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:63638) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgZWv-0000Px-Bo for 21559@debbugs.gnu.org; Mon, 28 Sep 2015 10:35:50 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NVE002005R4AH00@a-mtaout22.012.net.il> for 21559@debbugs.gnu.org; Mon, 28 Sep 2015 17:35:47 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVE001FF5VMYI60@a-mtaout22.012.net.il>; Mon, 28 Sep 2015 17:35:47 +0300 (IDT) Date: Mon, 28 Sep 2015 17:35:58 +0300 From: Eli Zaretskii Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-reply-to: <87612uzla3.fsf@smart-cactus.org> X-012-Sender: halo1@inter.net.il To: Ben Gamari Message-id: <83zj06d31t.fsf@gnu.org> References: <87wpvebraz.fsf@smart-cactus.org> <83mvw9hbks.fsf@gnu.org> <87612uzla3.fsf@smart-cactus.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ben Gamari > Cc: 21559@debbugs.gnu.org > Date: Mon, 28 Sep 2015 16:11:16 +0200 > > Eli Zaretskii writes: > > >> From: Ben Gamari > >> Date: Fri, 25 Sep 2015 14:45:56 +0200 > >> > >> One imperfect workaround would be to instead schedule a worker to call > >> `vc-fine-file-hook` at some point in the future when the repository is > >> more likely to be idle (for instance, when there have been no change > >> events for a second or so). > > > > But autorevert already does exactly that: it doesn't act on file > > changes immediately, only once every N seconds. N defaults to 5, > > perhaps you could try customizing auto-revert-interval to a larger > > value to see if that solves the problem. > > > This is not true is auto-revert-use-notify is enabled. You are right, I forgot: things were originally like I described, but were later changed to fix bug#18958. > I threw together a patch [1] implementing the suggestion I presented > above. I have yet to rigorously test it but I have yet to experience the > issue since starting to use it. Thanks. However, it looks like your suggested patch reverts back to what we had before we fixed bug 18958, doesn't it? If so, we will have to look for some other solution, because we don't want to reintroduce that bug. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18958#5 for the details. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 28 11:06:13 2015 Received: (at 21559) by debbugs.gnu.org; 28 Sep 2015 15:06:13 +0000 Received: from localhost ([127.0.0.1]:46820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zga0L-00018V-4X for submit@debbugs.gnu.org; Mon, 28 Sep 2015 11:06:13 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:40883) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zga0J-00018L-0B for 21559@debbugs.gnu.org; Mon, 28 Sep 2015 11:06:11 -0400 Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id D5F8674CFA; Mon, 28 Sep 2015 14:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1443452110; bh=EP+8ItZfRiAjVFv83YN6xQ0Oupj/lR7NACNPyyBFwDc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iqfHD3d3JgmjJW7FC0D7Cvms9vZoXDftg/9yIIC4P9P6092nnbq4BCz942+fiKJSn c7BfQuxV2f7YGulxVs+2FgWClCR7VRTRI8u/zk1hLR8ZuCBgWjQnSpdC3M9Mk1bFK3 sVMqYQwOmsJpAIG/Ca+qHoE3kqv0t/4vbw3vANsA= From: Ben Gamari To: Eli Zaretskii Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: <83zj06d31t.fsf@gnu.org> References: <87wpvebraz.fsf@smart-cactus.org> <83mvw9hbks.fsf@gnu.org> <87612uzla3.fsf@smart-cactus.org> <83zj06d31t.fsf@gnu.org> User-Agent: Notmuch/0.20.2+73~gd432116 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) Date: Mon, 28 Sep 2015 17:05:58 +0200 Message-ID: <8737xyziqx.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Ben Gamari >> Cc: 21559@debbugs.gnu.org >> Date: Mon, 28 Sep 2015 16:11:16 +0200 >>=20 >> I threw together a patch [1] implementing the suggestion I presented >> above. I have yet to rigorously test it but I have yet to experience the >> issue since starting to use it. > > Thanks. > > However, it looks like your suggested patch reverts back to what we > had before we fixed bug 18958, doesn't it? If so, we will have to > look for some other solution, because we don't want to reintroduce > that bug. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18958#5 > for the details. I'm not sure that this is true. Note that my patch defers *only* the call to vc-find-file-hook, not reverting the buffer (which, correct me if I'm wrong, appears to be what this bug is about). Cheers, =2D Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWCVdWAAoJEHPt6ejPuu8B5mAH/0u/JOF7KJ6YozWd0byP75YG auwVPIkOZtGjQlv9TZEKSPCG6IqtAHqVnlrfsObI5Rwtb7FEsTl7mg650u+VXvcr jlOFfQx5WqHMLUi9P3rYj9wOJTucd0fVD9Xg17mNqjzNUtH6KsOfPoM/DcLQJN2l TmgzU5yG772Yb7iUKZsLRPW1UAQUf+MCkzOMIkSlCXYBk8t3CxI2uXCMrD8a3H9V 0ZJbYwZ3TXTFKN9t/atnl2BaCvTGLLgTN+RLV8JeFHGixfkYKb7kREjSb1IW3s0B b5KWBTXw2id5tV3IF8GOwaw+WYZl+kH4EQEni82snnkiRxh/Y1gsq9u4uvokm0o= =O8wS -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 29 04:47:12 2015 Received: (at 21559) by debbugs.gnu.org; 29 Sep 2015 08:47:12 +0000 Received: from localhost ([127.0.0.1]:47221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgqZ5-0003nb-Vu for submit@debbugs.gnu.org; Tue, 29 Sep 2015 04:47:12 -0400 Received: from mout.gmx.net ([212.227.17.22]:55585) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZgqZ2-0003nR-NB for 21559@debbugs.gnu.org; Tue, 29 Sep 2015 04:47:09 -0400 Received: from detlef.gmx.de ([87.146.40.24]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MCtLD-1ZpPPw3aF9-009emI; Tue, 29 Sep 2015 10:47:04 +0200 From: Michael Albinus To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> <83mvw9hbks.fsf@gnu.org> <87612uzla3.fsf@smart-cactus.org> Date: Tue, 29 Sep 2015 10:47:02 +0200 In-Reply-To: <87612uzla3.fsf@smart-cactus.org> (Ben Gamari's message of "Mon, 28 Sep 2015 16:11:16 +0200") Message-ID: <87mvw5r4s9.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:iWajoUAGtOyhcjsc9T+tHi9U4535D+gns2/DhlC2h5ra4oEFPgj gwWrDp73D4sbPch/wo29leyUd2BKfsrVGqIAdUH2uZwDKL42KSb+ryVi/D1sd/+x2LZbtYI HPOL+g+CSZBbuzROK75XJDNDB+fYOUwYOfGl6Nt1QGkfOLva43jaZQr4AQg8nj6z/RJpx8B fkGzpxxMCw9wR/2Y7cq0g== X-UI-Out-Filterresults: notjunk:1;V01:K0:mT/gJPJFo34=:payX4lxiA7vcjm/5MtQkfb bOnn1ZARJAWoJ9z6cYPX5SP2o9yC27Ey7eODISAoZcMtwgvj59M/UEsBwJsaZAuzMdA/yvSm1 7eIVDb+sXbD/U3q0wrc4G390hrMZmIlO0PilFZLboaHTjWGITabDhm8EpnWCiciIwg9X9LHbL pwWr37dPpCyi+ctj7imk7ZHUIxxkM3rOQJK4FaPeLayij5xy993+K2+usWxjLtGWfPEgNVshA lhbYrszoHhoHzwM/IBk40U+/njlsYt+zn/LRo3HNqKNQ0+6Z5WAqT6cSZbtrUip6c6KzlOiO0 k/idbTYGgMi0W09SNlzvQ4TjOQRauavHuqciUjobtm32w3JUo8MrFGnuEQi8/nudYLYW+tzaG NEKWneYfjT/sl/W7nFPil+RJtbzqBXZ79nxC2TJblD8mSAfO1PKfAr0gSK/aLYU8+f1zSGpXp u9YUG8WBetqeVTLNwfn7WP362UcEearKJI94CyU7t9FMZXdDESMW6xzMu9ahnScfkGUletDiP gJRtU3rFDg2hLPjrufw1XGWJziK5i5MLWDlWLudvtAAWO/sOsny7o4qwok/NG4h4MriLCAfHv dBkq0l7ubx6K5XLU7DXNugZUYOlNFI75tlAq8WIxLp1BV0udIa9pfBVgyQUy+7c67se0PF2sv UiUe5p8l1jxsOuP5fIjJHuGkwCJf39sV5o0EFlPKDSDQwKridOapP5s0m1duapLRALOO7ZSdG zyXrH2NyD60kd4t93iBspoIA4cRA2975QXVHig== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ben Gamari writes: > As an aside, it came as quite a surprise that autorevert (if I > understand the code correctly) still polls even if > auto-revert-use-notify is set. It seems to me that this is itself a bug. > As a laptop user who often works on battery, I keep tabs on which > processes eat CPU time and I have noticed that emacs is consistently > behind only firefox and Xorg in CPU time demanded at idle. I remember there were some reasons to keep this polling behavior. Must check years-old conversation in order to remember the reason. > I threw together a patch [1] implementing the suggestion I presented > above. I have yet to rigorously test it but I have yet to experience the > issue since starting to use it. Wouldn't it be better to provide a buffer-stale-function for files or directories under vc control? Mode-specific functionality shouldn't be added to auto-revert.el, I believe. > Cheers, > > - Ben Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 14:43:52 2015 Received: (at 21559) by debbugs.gnu.org; 26 Oct 2015 18:43:52 +0000 Received: from localhost ([127.0.0.1]:39404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqmkK-0005wP-IG for submit@debbugs.gnu.org; Mon, 26 Oct 2015 14:43:52 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:41583) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqmkI-0005wB-El for 21559@debbugs.gnu.org; Mon, 26 Oct 2015 14:43:50 -0400 Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 8E16A42B42; Mon, 26 Oct 2015 18:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1445884331; bh=9iCP7rVCcMGiOf+KQxxa2RwSWeSgikyl7raKpxQLI1g=; h=From:To:Cc:Subject:Date:From; b=AaujjjPp4E9eEHsdl32EgJiA7tFMwbP6uIfjBj0Nz6eCWfh6iz6sk+jiMTwwXQkmv jzWQ1wLQu1lzgz+rTc/Zl1VHCcVDCR02YbgUfw4MjiDd8PI1tGsiTl4sgMT85syl/D k1fwXczwOKpvHgC/OezZxcaRDvpeG/jWg6bhk9X0= From: Ben Gamari To: emacs-devel@gnu.org Subject: [PATCH] autorevert: Wait for repository to become idle before calling vc-find-file-hook Date: Mon, 26 Oct 2015 19:43:37 +0100 Message-Id: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> X-Mailer: git-send-email 2.6.1 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, eliz@gnu.org, michael.albinus@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi all, This is a patch that I've been using locally for a few months now to resolve #21599, where auto-revert and vc conspire to break git-rebase. Ultimately the problem is a race-condition which would require a change in git to resolve completely, but in practice this timeout-based approach eliminates the issue. Cheers, - Ben From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 14:43:56 2015 Received: (at 21559) by debbugs.gnu.org; 26 Oct 2015 18:43:56 +0000 Received: from localhost ([127.0.0.1]:39406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqmkN-0005wZ-ST for submit@debbugs.gnu.org; Mon, 26 Oct 2015 14:43:56 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:41586) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqmkJ-0005wI-HQ for 21559@debbugs.gnu.org; Mon, 26 Oct 2015 14:43:52 -0400 Received: from localhost.localdomain (HSI-KBW-109-193-204-037.hsi7.kabel-badenwuerttemberg.de [109.193.204.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id BACAA435AB; Mon, 26 Oct 2015 18:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1445884332; bh=QocgeQvSG1zNDC16y8OycyjTpImOMOkwc4wWDb61f5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a3GCs44xo5WxxC2JPH+PtZY2O43uDRi3M3R0XScMllaeVcx63VNYlmjcsRgJ2AEyZ 77+5Ggi+p4pd+RYIvhe7Op4sorJBOGbYrVKsdFgvHCAt/S9abqf4UIduAiqy9HD9+r KCUAsXOdvIAQTYiD4QpQDXapdWc0H5V/gJxACTf0= From: Ben Gamari To: emacs-devel@gnu.org Subject: [PATCH] autorevert: Wait a while before calling vc-find-file-hook Date: Mon, 26 Oct 2015 19:43:38 +0100 Message-Id: <1445885018-17451-2-git-send-email-ben@smart-cactus.org> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: Ben Gamari , 21559@debbugs.gnu.org, eliz@gnu.org, michael.albinus@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) This provides a resolution for Bug #21559. emacs running with `auto-revert-mode` enabled breaks `git rebase` in repositories where files are open. The problem appears to be that `auto-revert-mode` attempts to refresh version control information with `vc-find-file-hook` on revert events. `vc-find-file-hook` calls out to `git`, taking the repository's index lock. This interferes badly with `git rebase`, which performs many git commands in quick succession. When `auto-revert-mode` is enabled there is a very high chance that the following race will occur, git emacs ---------------------- ----------------------------- 1. git rebase checks out a commit, releases `index.lock` 2. `auto-revert-mode` notices change, firing off a `git` process and taking `index.lock`. 3. git rebase applies patch and attempts to commit. Notices that `index.lock` is taken and fails. 4. emacs' `git` process finishes, releasing lock In the end the user is left with a badly broken rebase process and an error message complaining that `index.lock` exists, which he then goes to confirm and finds no such file as emacs has already released the lock. We work around this by scheduling a worker to call `vc-fine-file-hook` at some point in the future when the repository is more likely to be idle (for instance, when there have been no change events for a second or so). Signed-Off-By: Ben Gamari --- lisp/autorevert.el | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 37ee8ee..0c25ac3 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -136,6 +136,11 @@ auto-revert-tail-mode (defvar auto-revert-timer nil "Timer used by Auto-Revert Mode.") +(defvar auto-revert-vc-check-timer nil + "Timer used by Auto-Revert Mode to schedule +checks of version control information. See +`auto-revert-schedule-vc-check' for details.") + (defcustom auto-revert-interval 5 "Time, in seconds, between Auto-Revert Mode file checks. The value may be an integer or floating point number. @@ -260,6 +265,13 @@ auto-revert-check-vc-info :type 'boolean :version "22.1") +(defcustom auto-revert-vc-check-idle-time 2 + "How much time to wait after noticing a changed file before calling +`vc-find-file-hook' or nil to check immediately." + :group 'auto-revert + :type 'number + :version "25.1") + (defvar-local global-auto-revert-ignore-buffer nil "When non-nil, Global Auto-Revert Mode will not revert this buffer. This variable becomes buffer local when set in any fashion.") @@ -671,7 +683,28 @@ 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-find-file-hook)))) + (auto-revert-schedule-vc-check)))) + +(defun auto-revert-schedule-vc-check () + "Schedule a call to `vc-find-file-hook'. + +We need to be careful when calling `vc-find-file-hook' after file changes +as some version control utilities (e.g. git rebase) have a tendency +to do many successive calls and will fail ungracefully if they find +we have taken the repository lock. + +For this reason we wait for the repository to be idle for at least +`auto-revert-vc-check-idle-time' seconds before calling +`vc-find-file-hook'." + (if auto-revert-vc-check-idle-time + (progn + (when (timerp auto-revert-vc-check-timer) + (cancel-timer auto-revert-vc-check-timer)) + (setq auto-revert-vc-check-idle-timer + (run-at-time auto-revert-vc-check-idle-time nil + 'vc-find-file-hook)) + ) + (vc-find-file-hook))) (defun auto-revert-tail-handler (size) (let ((modified (buffer-modified-p)) -- 2.6.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 27 04:26:03 2015 Received: (at 21559) by debbugs.gnu.org; 27 Oct 2015 08:26:03 +0000 Received: from localhost ([127.0.0.1]:39946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqzZy-0001TM-OM for submit@debbugs.gnu.org; Tue, 27 Oct 2015 04:26:03 -0400 Received: from mout.gmx.net ([212.227.17.20]:52834) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZqzZw-0001Sp-PF for 21559@debbugs.gnu.org; Tue, 27 Oct 2015 04:26:01 -0400 Received: from detlef.gmx.de ([93.209.72.251]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0LnDof-1aR8fq4Bu1-00hK7t; Tue, 27 Oct 2015 09:26:00 +0100 From: Michael Albinus To: Ben Gamari Subject: Re: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> Date: Tue, 27 Oct 2015 09:25:58 +0100 In-Reply-To: <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> (Ben Gamari's message of "Mon, 26 Oct 2015 19:43:38 +0100") Message-ID: <87fv0wogyx.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:2QH08/XoSab7SZmrNPbmjl49jX1AxYcBtHjc55z8VgrFxPOCq7n TgNQ9MbZOcV65sXclctaMfRmvTAJFtkXopBMi25xJfCC+btcmqlG1zrNZ0iB8jtgH2ch466 C5N9cx+p3TSIYTc7/5AUBj5YQL7dGboJ4CzYz+KcQ2AINUgbXE+huUSh+XHI3HfoOm1Qpjg TJh7kV/8Y/ZH6XiBlBPkQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:7+2V8qwiZuw=:acEztoRKbTnM57PrbvBx9i 2/TAA6OB52jbaTQI0jIXRbPJA1GCeodV+2GAp32Z5gMdMubLvrjToC/Rg0L/FR3Tvj4BJtn1f 3BjGA0mubzxrAqK+ZmH8Y7OlLUKqRCrwwvqBLKksIALs+tCL6m5720NGWNd2Rwc4ZlcbTfRWp cqZTeSuOGwETk1m/Yv2haxXzb8Ek/USlfQEG6fTHoIPoMKrXmUAosbt4mZkdeW4w8ValziAfX Qkd3U6RkTDjFAzZJileWO6jhh4ZmbPcvwD27mYIL0p2b3MkvnBHl9i2RhN5438uFc8+oWsSxq hMBsBrXw092u1CXQWzeymzINyMW0PrYwzFzX9SjFlxlpvmUiicS0NdLA6EaZH4ZM6xotpe/6e S7+E9yr+mu2BBSw/19v5y6VQmXzP8lfYYMuFWQWDs7+MCtPKGRY9o1TSDmwxT8QZvZpoOeJyi 7taRe6U1Rp7oD2sDh9amKgr6ZCcg7HhNOe6W1consolEgyRkuWAZ6VhBpMla+ls8i7/IAiSy0 y8JAhJF7cRis58+1hO5IiozE6d/d+Dhy37egpuXAR+hE3KXQCYZuZvt5uO1yqi7qdHJRQcljZ 9PFq7B2dy9xVIzXurqnbOBGZEW9952ex/eWuJDoTF2lvtNb4zJYNmc2Xsjup9vfjzr7gz2lAL s7dh+dV/PyTrRMbDOMmKyNm6H9Tf9s69PFXytZX8POtrno94hLMJwYDOEHHIiNDxJe/5mh9ms Oh8XkUoHYVe627vioKwyTlL/ouqMUtE8ts4B5iJgDLj+hP7Yil1JwcPmya5iCTbqX01JGT7H7 RvNdeyF X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) [removing emacs-devel, discussion in one ML is sufficient] Ben Gamari writes: Hi Ben, > This provides a resolution for Bug #21559. Thanks for the patch. But as I said already, I'm not happy to insert so much hard-wired vc related operations into autorevert.el. And this is triggered just by git, IIUC the other vc backends do not suffer from this problem. Have you considered another solution, maybe by providing vc(-git) specific buffer-stale-function and revert-buffer? This would be much more in the spirit how autorevert is supposed to work. And this would simplify maintenance, when git changes its behaviour, and we need to adapt vc-git accordingly. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 08:00:25 2015 Received: (at 21559) by debbugs.gnu.org; 28 Oct 2015 12:00:25 +0000 Received: from localhost ([127.0.0.1]:41270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrPOg-0006Jh-4g for submit@debbugs.gnu.org; Wed, 28 Oct 2015 08:00:24 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:41686) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrPOb-0006Ia-Ka for 21559@debbugs.gnu.org; Wed, 28 Oct 2015 08:00:03 -0400 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 6A95046EF2; Wed, 28 Oct 2015 11:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1446032900; bh=qP4z/b0aMWlTEUl3brEQ9C65OECc6o11DW0fw5ktzeg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=P08gyisEFnlZizH/bjXO8yjCmV6L04Y2loy9qz68EzGlxdgBhFx3jf4P0Vn6k6SWT SDNlrmQ9/IfM6f40oELIm819yKIbdOHEjte0KH5vbcJxH/uL4qJlDg5KKMn5QbeiCQ P/S6LYfwUzg31tIaagh6jHxxqJD9oki3i1pC+DpI= From: Ben Gamari To: Michael Albinus Subject: Re: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook In-Reply-To: <87fv0wogyx.fsf@gmx.de> References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> <87fv0wogyx.fsf@gmx.de> User-Agent: Notmuch/0.21~rc3+6~g4acbc1f (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) Date: Wed, 28 Oct 2015 12:59:39 +0100 Message-ID: <87a8r3w6dw.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Hi Michael, Michael Albinus writes: > [removing emacs-devel, discussion in one ML is sufficient] > Okay. Works for me. > Ben Gamari writes: > > Hi Ben, > >> This provides a resolution for Bug #21559. > > Thanks for the patch. > > But as I said already, I'm not happy to insert so much hard-wired vc > related operations into autorevert.el. And this is triggered just by > git, IIUC the other vc backends do not suffer from this problem. Fair enough. > Have you considered another solution, maybe by providing vc(-git) > specific buffer-stale-function and revert-buffer? This would be much > more in the spirit how autorevert is supposed to work. And this would > simplify maintenance, Could you perhaps describe in a bit detail what the semantics of these functions would be? I'm not entirely sure I understand what you are proposing. > when git changes its behaviour, and we need to adapt vc-git > accordingly. You are more optimistic than me on whether git will be fixed ;) Thanks for your feedback! Cheers, - Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWMLirAAoJEHPt6ejPuu8B+BMH/24+IP6C2fG1PbkSt4Coy1i6 idc/ezoo7Sh4M6PkncynslCUh77Gga0bHCrNJhBUIf70u0TKAwc+sqwKOq7In4Ws xECZ4rIARsYzUJ64WS1yKmZNWs6G/EWlkUtmhdyjAixioNSUCh6N0uSSumOCOoOG nNLeF6tO97qy5KAiwq3cO2SzlZWuGjV//NiprpyQBRQx73rIPiv1ibvLrYRB8TNX sCYoZFgI2PTwvuh/AInvH3iMF9Im/TLaQ44PrTCbdC2S5Ol7NQIJZKscFn/sS6L2 SQF0eDXJ8uQz2r4rNcYZeh1JoAmv9u9S0gs/gydxBcEE5FcRlic4jCUlfTZt8C4= =0IUq -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 10:45:32 2015 Received: (at 21559) by debbugs.gnu.org; 28 Oct 2015 14:45:32 +0000 Received: from localhost ([127.0.0.1]:42645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrRym-0003nm-1d for submit@debbugs.gnu.org; Wed, 28 Oct 2015 10:45:32 -0400 Received: from mout.gmx.net ([212.227.15.15]:54743) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrRyj-0003nb-It for 21559@debbugs.gnu.org; Wed, 28 Oct 2015 10:45:30 -0400 Received: from detlef.gmx.de ([87.146.60.252]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Lh7PL-1aFFHl0nrT-00oVyF; Wed, 28 Oct 2015 15:45:26 +0100 From: Michael Albinus To: Ben Gamari Subject: Re: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> <87fv0wogyx.fsf@gmx.de> <87a8r3w6dw.fsf@smart-cactus.org> Date: Wed, 28 Oct 2015 15:45:25 +0100 In-Reply-To: <87a8r3w6dw.fsf@smart-cactus.org> (Ben Gamari's message of "Wed, 28 Oct 2015 12:59:39 +0100") Message-ID: <87k2q7127u.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:Rc9GZdxR8DmBALRng+4In7fT+4Gu9Ndy4QGf82GSovNv/cqdJ6/ 2q67hTdkbYcSVzMrkkV36hOacn//RVliFT2765wpRS78yWAAPndg4uGhkcpotOQbcrZ3FB/ wKhDlCYVfebl5t7C42kS0rZAo4PkkVKmPT/3MuNcJ6QmvWmHOj0jYiwET6x5DV/a6o/vhzg tsW1Xj0pqTL8bfvASkN7g== X-UI-Out-Filterresults: notjunk:1;V01:K0:fxv20W2IV+8=:3juSLojqahMnQlR2XcC8qT VwPJojZxwcI45Cc0aQVz0dqZ0AV2eEZ28KSpGRNKwKnhGO8UTIs9z4cmWW8EG9v23wpuElDKx E1Dtyms+XSQShBkPGpNzT7AzeufDzK+uo/fYC9TM/x33LLxXVD9Kuond6rT4C4e4EDd9nV5lJ 78IFJiCklBW69oth2ZOBE9NyxyazVgKG0UMjIORJbXPitdseoe5EBUm4huCv2GHQegFA1+zta FXHsookKHEG9Qo9uX5g2yOqKGW9o1Tenm8N7wPgbYpsakbm0F5YFhKPqhPfuXvmxo0RnsPI5S yRRtr+ssg1pBp/yY/ki38g9CyDS0y+iRozlFLS/Tl6Y+mY2XissBwKpDT0qmNCAw8jxu7iDO/ Pq0QFPZugSR7S0GBhYcDfnhtdeenm8IAdbgzdU/W91y6GeFUO1Sgq3ZrmF/MffFcNh9vC7SO7 GfPVcBPor2O1zHQftm6YNcsUouTERt50i2xvAExs48zXQDkrSu9yN/Q7rI7p5Zuo07qG1Zz5h T1UzSFud/eDzaXgASmBBtElD4/0+OVjvEHMP98YuAC8ZV/NoNsZew4lqA5IjJB3vjwAjF1lD8 k5I0YT8sLh3KEexeKQ6yYqL3T7eSV4c3DGp2E69NfIDDsVX124DFI3zgEnLeoqNkhqsCaT71B BbeKEQ/YHm/4asz3XgGoJj7caApvIsgyEdWFmn7hVGAYm/AOJu0XCDd3HgU/xcikUhcICYC7V mxNhoVMJYfwdNyqavMintI5DfvWuJQidLO7/vM6e4uX65ftZQ6MQxR0KEpsgY9qi+bdBnk1zE Jc30CxV X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ben Gamari writes: > Hi Michael, Hi Ben, >> Have you considered another solution, maybe by providing vc(-git) >> specific buffer-stale-function and revert-buffer? This would be much >> more in the spirit how autorevert is supposed to work. And this would >> simplify maintenance, > > Could you perhaps describe in a bit detail what the semantics of these > functions would be? I'm not entirely sure I understand what you are > proposing. As starting point you might read about `revert-buffer-function' in (info "(elisp)Reverting") and about `buffer-stale-function' in (info "(emacs)Supporting additional buffers") See also in a dired buffer the values for both variables, and how the functions work for dired. >> when git changes its behaviour, and we need to adapt vc-git >> accordingly. > > You are more optimistic than me on whether git will be fixed ;) I have no special opinion about git. I just use it, without being impressed. > Cheers, > > - Ben Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 28 13:06:01 2015 Received: (at 21559) by debbugs.gnu.org; 28 Oct 2015 17:06:01 +0000 Received: from localhost ([127.0.0.1]:42769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrUAj-0007MU-4I for submit@debbugs.gnu.org; Wed, 28 Oct 2015 13:06:01 -0400 Received: from mail.smart-cactus.org ([54.187.36.80]:41689) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZrUAh-0007MM-Hu for 21559@debbugs.gnu.org; Wed, 28 Oct 2015 13:06:00 -0400 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 37F32434FC; Wed, 28 Oct 2015 16:54:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1446051258; bh=xcJ1eg5wfGlv/qLZhBtK86P7/SALYKOdJ6mZ3P2ms8o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YZJjURjqWvGtmlQV/v0DonWTHLCyzqBAZ1l8iRI19U34W4xdsQ+dphUrHOXzq87WY qLa7ZbtUzzugTL9RzDZsiZ1PVq00Rzxi5FOcRcXmXDGgpd48leTpGZOawexB/G0+te Go+KkAgGGG6/ct5uii9b/CQtRqw2M7IoHPhehMT4= From: Ben Gamari To: Michael Albinus Subject: Re: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook In-Reply-To: <87k2q7127u.fsf@gmx.de> References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> <87fv0wogyx.fsf@gmx.de> <87a8r3w6dw.fsf@smart-cactus.org> <87k2q7127u.fsf@gmx.de> User-Agent: Notmuch/0.21~rc3+6~g4acbc1f (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-pc-linux-gnu) Date: Wed, 28 Oct 2015 18:05:51 +0100 Message-ID: <8737wux6s0.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Michael, Michael Albinus writes: >>> Have you considered another solution, maybe by providing vc(-git) >>> specific buffer-stale-function and revert-buffer? This would be much >>> more in the spirit how autorevert is supposed to work. And this would >>> simplify maintenance, >> >> Could you perhaps describe in a bit detail what the semantics of these >> functions would be? I'm not entirely sure I understand what you are >> proposing. > > As starting point you might read about `revert-buffer-function' in=20 > (info "(elisp)Reverting") and about `buffer-stale-function' in > (info "(emacs)Supporting additional buffers") > > See also in a dired buffer the values for both variables, and how the > functions work for dired. Thanks for the references. I now have a better idea of what you are proposing. I do, however, fear that your solution might be too large a hammer for the problem at hand. Ultimately the problem here is an annoyingly narrow one, namely the fact that auto-revert's action is correlated with file modifications due to rebasing. For this reason I think it may be best to keep the solution confined to auto-revert. In particular, I'm afraid that the changing the semantics of revert-buffer may break other users of this function who expect its effect to be apparent immediately after invocation. It seems like this approach may easily and unwittingly trade one subtle form of breakage for another (even harder to find) one. Cheers, =2D Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWMQBvAAoJEHPt6ejPuu8BOOIIAJuhTbtouG13Ko3EB59FDXir OrV5czU+jxEKXG+pbVyj+o6AsXXuGYRl/ywthbMfY09DdoIThdDM/MhhdT+XZ6Dh ysClbw2Y69rI8sYyOAyIrxCKABSocD2DyBRtJb2AaNRnyGeUEfoKyY9r/luBRYEz kepX32Rf29ZE2nlH2E6ABUBQANd699lhRo71zvBNeXwISd0nu0DTqHKapnhOIReR msGHXMX4LWCxGyBQ9/oH9+JJwd9OXVjCNb1D/+GGBkns8dB/Jw9qWnpeG/1HJxfG THIjcJWf/uRt8AbsAQ22S1OoZttzYTkIa8RO6WKpMEYFLb2WaYj7JamhYyocJPM= =qo2o -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 29 04:20:47 2015 Received: (at 21559) by debbugs.gnu.org; 29 Oct 2015 08:20:48 +0000 Received: from localhost ([127.0.0.1]:43202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZriRz-0006lX-Fj for submit@debbugs.gnu.org; Thu, 29 Oct 2015 04:20:47 -0400 Received: from mout.gmx.net ([212.227.15.18]:61266) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZriRe-0006l3-Q2 for 21559@debbugs.gnu.org; Thu, 29 Oct 2015 04:20:45 -0400 Received: from detlef.gmx.de ([79.195.15.93]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MS5Dm-1a3El13xAg-00THPz; Thu, 29 Oct 2015 09:20:26 +0100 From: Michael Albinus To: Ben Gamari Subject: Re: bug#21559: [PATCH] autorevert: Wait a while before calling vc-find-file-hook References: <1445885018-17451-1-git-send-email-ben@smart-cactus.org> <1445885018-17451-2-git-send-email-ben__31073.4246545055$1445885089$gmane$org@smart-cactus.org> <87fv0wogyx.fsf@gmx.de> <87a8r3w6dw.fsf@smart-cactus.org> <87k2q7127u.fsf@gmx.de> <8737wux6s0.fsf@smart-cactus.org> Date: Thu, 29 Oct 2015 09:20:25 +0100 In-Reply-To: <8737wux6s0.fsf@smart-cactus.org> (Ben Gamari's message of "Wed, 28 Oct 2015 18:05:51 +0100") Message-ID: <87vb9qulva.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:dBbwq+p+vthqP2qcunc8wekhWr9Llx4k/t0S5WYD77kRYS9pFHh EKaFbG1OLgPa69WAESZMapW5MGTi7k/FytLJVwj2hUIJfFqyqdM3IyQSSv9jwMgxEUaGvau mXy55+w4NUoIp1cZUzLtu4VRbWryKUIyizQkPjon2XeElsJ73hHk0asCMo/4g2GG+atTw4t qKWVW13sFECLnxqJi4qWQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:oODJ/+tweQI=:9ErViT31bFNq23ZSgVxtuq SRYYf8o9OtXZoCIK5xkXieFd1HhmySZxcbBP3iI7eSqeunK1chk+DG0kL6vXTtmxvbD6uHYnt jwQNcOSxG/m+/0c7nR5K8iaoBK876tC3NK5QZCmVkxAJUpU7/XMhUZW9xyoDYLYDlyrkwI/y9 K7lW79Vw2e49r/3KEcebnRYFPdSJhayNbViAJ7x99uKE+jNefs6FoCqSCVDBQZEL0I6APL3cr YOJFMoTNDCinw8qHeaRyYoeGGkVbScTB3kNWPSKjkPhKR+XyOllcUAAxWZRV3TVf1HbmYIm51 lQ68vV6ql+QmdTvrLXwDNGG6V57jfZYcEbwY9Zh73awcXPru0RKZpmFzmuN6ApOdY+ej/2pBa xRwwEyNUuo14Yo47ON1Fryr2rUvt+hXwXzNzHrq48luMpfLEKbCE2WGeE7ayefbjhSc2NGFlp OwXBqsSN2naIkL1cbjONgDcHYZM8N90/85IY5n+efFMtfjFYsv1AAGz8WbQ6brYYWwFU8Z30x 4zqJyxrbXVIw4ZnKj1EZfUkNgZCmekMXZSbE5z1cChRN1vL+B/vWcTWKPXS/frmlVkExEQ4Kf nKHWp7nCGSE21/VQq33hUb5627+VeqL8SZrEaw+lVTSuoVBw5ftJImFxyxWQ1Se6yCqlbotH9 oWoL30leTWyf+R42JDHq1TqqjgYO89Zg/io8Gtyr5g3n6rvlh/f2SvnrIH6Rvp+qzw8gCjh5C ec0kW85OfAzkwHKwHEgLVZ7jhwSidkvf7VtVc+RBI1Ce0jRNCg3Bmz6qq1hgwlNlGo8jMArIw 3GzM9HJ X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Ben Gamari writes: > Hi Michael, Hi Ben, > Ultimately the problem here is an annoyingly narrow one, namely the fact > that auto-revert's action is correlated with file modifications due to > rebasing. For this reason I think it may be best to keep the solution > confined to auto-revert. > > In particular, I'm afraid that the changing the semantics of > revert-buffer may break other users of this function who expect > its effect to be apparent immediately after invocation. It seems like > this approach may easily and unwittingly trade one subtle form of > breakage for another (even harder to find) one. I agree with you not to change the behaviour of revert-buffer for other use cases but auto-revert. One could do it by introducing a new local variable auto-revert-buffer-in-progress-p (similar to revert-buffer-in-progress-p), which is bound during auto-revert. Then it would be possible to define a new function (defun vc-git-revert-buffer-function (ignore-auto noconfirm) "vc-git specific revert function." (if (and auto-revert-buffer-in-progress-p (check-for-git-rebase)) (do-something-special) (revert-buffer--default ignore-auto noconfirm))) One could also check, whether adding a function to before-revert-hook could be helpful. An alternative, w/o touching revert-buffer for vc-git files, would be the provisiong of a special buffer-stale-function for vc-git. Something like (defun vc-git-buffer-stale-p (&optional noconfirm) "vc-git specific buffer-stale function." (check-that-git-needs-revert-and-it-is-safe-to-do-so)) This function returns t, when a buffer with a file under vc-git mode needs a revert, and it is safe to revert it (no git rebase is running). When autorevert either polls, or it is indicated by a file notification event, it calls this function and reverts the buffer if the function returns non-nil. If the function returns nil, auto-revert is skipped for that buffer, and it is checked again by the next poll (after 5 seconds). By this, autorevert.el would stay clean (no additional vc related code), and you would even not need to implement an own timer. > Cheers, > > - Ben Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 05 19:01:39 2016 Received: (at 21559) by debbugs.gnu.org; 6 Feb 2016 00:01:39 +0000 Received: from localhost ([127.0.0.1]:34933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRqJm-0003Lr-Sq for submit@debbugs.gnu.org; Fri, 05 Feb 2016 19:01:39 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33224) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRqJl-0003Lg-JY for 21559@debbugs.gnu.org; Fri, 05 Feb 2016 19:01:38 -0500 Received: by mail-pf0-f175.google.com with SMTP id w123so76987801pfb.0 for <21559@debbugs.gnu.org>; Fri, 05 Feb 2016 16:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=ViQf6y03Vs+PI45QE6oRlIYtxkCZPlrkYkY06FqUiF0=; b=lGuiloCYXazEL8vv5fHNTkhYnmswP8m/KSvb+Q5eM3dXjDfDNpjTa72cxGM+dXXcC1 K6wmXETYtRyrszsZv2C85cS8HCKasIZct/4eWcZYA2oD1jWIEGxgOJtijGTrOVaJtGwn OZjSS/uPjnOB7DFDmIHCcn6KW50YyLfT97fYhauIwK/7sWC6ymQvb5gDovhJU++X3BRq VJMDfAw9vpiZDBApGSMVxcQF83Cq765xe9jQ1gPYqr77p10CdeUBwZXmr/bBfnfA4NBc kMQjsul48V16NsVqRwFs0O2tN0EAq12FLkys0b3IGRMYwZZpFbGVQt4vU70D2kqiDKKt CTZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=ViQf6y03Vs+PI45QE6oRlIYtxkCZPlrkYkY06FqUiF0=; b=Hn6bsEiazfHsdPJ+SNOU86bLL9G0HgSI4GfYY6ljAlduNDYkjdkNLQFc2a9yaEWphV 8OVN+XPVZ/Gu4zoLVmzMV0/BXXnyKYhTiIVKtle+rGqelSlbSgEDe3e3ICZP+uvBKkC2 dyiNnpAzzAbzaAPKc2qH/VMgyhPpnwZPlj6qoIp3OhkwD4QJgCHs8zChMvWRckcJuDoa zHw2aMSktOagml8txQqkMeQ0JEWLm2B7gic7VGHzrkP7968ZQuWLSWA0CiHsuBep+WJ8 zJnSvzSvFDQIyThOTokM/LwQI7Qt/NyShmrI6yjkUiP5n+3GC3c90orqi5tr2Zc7Hyj2 hA+A== X-Gm-Message-State: AG10YOTlhehDTULtTL1ICbxqxqjfvrZWGD0U+EgjaSlpOAg9N3V/raieRY8QE0oUiWnIdg== X-Received: by 10.98.42.74 with SMTP id q71mr23708466pfq.18.1454716891673; Fri, 05 Feb 2016 16:01:31 -0800 (PST) Received: from mitchelh-linux (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id m75sm26927202pfj.38.2016.02.05.16.01.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Feb 2016 16:01:30 -0800 (PST) From: Mitchel Humpherys To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> Date: Fri, 05 Feb 2016 16:01:33 -0800 In-Reply-To: <87wpvebraz.fsf@smart-cactus.org> (Ben Gamari's message of "Fri, 25 Sep 2015 14:45:56 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) On Fri, Sep 25 2015 at 03:45:56 PM, Ben Gamari wrote: > Arguably `git rebase` should be holding the `index.lock` for the entire > duration of the process (or be more resilient to the lock being taken) > but sadly this isn't the case. Emacs should behave appropriately to > accomodate this behavior. I don't think this is quite right. As I understand it, git only takes index.lock for operations that mutate the index [1]. It wouldn't make sense for git to hold index.lock for the entirety of the rebase operation since you can stop in the middle of an interactive rebase and do anything you want (mess with the index, add new commits, anything). I think the real question is: why is vc-find-file-hook (or vc-refresh-state) trying to mutate the index? Shouldn't refreshing a buffer be a read-only operation (at least with respect to the VCS)? [1] http://git.661346.n2.nabble.com/Git-rebase-dies-with-fatal-Unable-to-create-git-index-lock-File-exists-td7596365.html From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 07:34:18 2016 Received: (at 21559) by debbugs.gnu.org; 6 Feb 2016 12:34:18 +0000 Received: from localhost ([127.0.0.1]:35170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS24A-0008UT-E9 for submit@debbugs.gnu.org; Sat, 06 Feb 2016 07:34:18 -0500 Received: from mail.smart-cactus.org ([54.187.36.80]:45615) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aS247-0008UG-Qn for 21559@debbugs.gnu.org; Sat, 06 Feb 2016 07:34:16 -0500 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id A747240449; Sat, 6 Feb 2016 12:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1454761214; bh=B1BU0jqAHEoNnQPqp7wEhDW0840wriGeFTLHytcUjZc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RD3iwL6xVBHh2YkjO24PEWN+sm6cqopeIUyQ27P9PahUXagjhMQ1tR3eWOD/KYZ/7 a7JpJOozcTAJE//Yd5rXmDWr289ubzI5ftNfrai1xntGRkt+q843yq3ck1c5GKjqGk DErlWwvDRh6Bn2HlYCtVtNCr5xKt/z1bxo+OnORs= From: Ben Gamari To: Mitchel Humpherys Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: References: <87wpvebraz.fsf@smart-cactus.org> User-Agent: Notmuch/0.21+24~gbceb651 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-pc-linux-gnu) Date: Sat, 06 Feb 2016 13:34:06 +0100 Message-ID: <87oabu9fwh.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain Mitchel Humpherys writes: > On Fri, Sep 25 2015 at 03:45:56 PM, Ben Gamari wrote: >> Arguably `git rebase` should be holding the `index.lock` for the entire >> duration of the process (or be more resilient to the lock being taken) >> but sadly this isn't the case. Emacs should behave appropriately to >> accomodate this behavior. > > I don't think this is quite right. As I understand it, git only takes > index.lock for operations that mutate the index [1]. > > It wouldn't make sense for git to hold index.lock for the entirety of > the rebase operation since you can stop in the middle of an interactive > rebase and do anything you want (mess with the index, add new commits, > anything). > Ahh, yes. You are quite right. > I think the real question is: why is vc-find-file-hook (or > vc-refresh-state) trying to mutate the index? Shouldn't refreshing a > buffer be a read-only operation (at least with respect to the VCS)? > As far as I can tell vc-find-file-hook is merely calling `git ls-files -c -z -- $FILE`, which sounds to me like it should indeed be a read-only operation. Cheers, - Ben --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWteg+AAoJEHPt6ejPuu8BwawIAIBB7Nn+z+hFNHm0YhXWhvZ2 TJfoOWSznJ/Z8oOyGT7VWvstpn3RLaSOjt/7r5GVyyGd7U6GdPCz/p4tokPqxrGC bfNEGLjc+mH4vi/XgR1wqqxV1HbI2RUW2dSRypCCl3nYyHrZEz19l73MSaX4GGcT W8ci6JeSHgvrZ0ycyPkUtbiEURoWrp9buEBJbTwTl7Ckt3VhtzWAnsKxJgXjU7hf aoF7+8UqnJ7JMYZMYVf6z6uLTejAe5MClJsOo5YcxWYmL7NEVe/xZHp/MDxxTfnH KDbBYQ8PqOwUcDe4skg/j5VAEqgmruMcD44Kp+2PXn/1iTCrAarteYC+iZnDNmM= =6e84 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 20:35:00 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 01:35:00 +0000 Received: from localhost ([127.0.0.1]:36195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSEFf-0001Zh-Vx for submit@debbugs.gnu.org; Sat, 06 Feb 2016 20:35:00 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:33997) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSEFe-0001ZS-CL for 21559@debbugs.gnu.org; Sat, 06 Feb 2016 20:34:58 -0500 Received: by mail-pf0-f178.google.com with SMTP id o185so89877712pfb.1 for <21559@debbugs.gnu.org>; Sat, 06 Feb 2016 17:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=yRRitDhIUnHXssD12wVU8lA1S8hmFUQMtBRwBaNrt28=; b=eiSPE4861rEtS5VG1kMhCkzyNaKdrmj3ofhEMbQq8TlLRHuo6trD8kqQktc6Fpor6I 4H6GIzCapQistpxN6euN0mLEOZnaufLlUz9ClRAav9XI9ShWtSa4WVEy/jyU966UmyoM ELY+Hrhm3GR0UGvFCEoXJKhl15WkWC386BFV62adrULlcqZumeFPb8rz63deY7WrFJqI UzPmLDWMwCH0/4aaYAhPiRudzzYyOC7fhf/HVoRDK/1Re4S7nK5Z/J9nsfagdpkPOkPx dZFjenCHzFAocWacdatZdVuv0HIUhRB/K8c9S5T0yvCm0FK3soA1HPmDIZfHRtx4nd5r /SrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=yRRitDhIUnHXssD12wVU8lA1S8hmFUQMtBRwBaNrt28=; b=NgfPKpuHmc0UJyxtsmmmHoCa4uPyQm0SoW2cgcBEvnMWAeSEMgEDizwvxJxCwFDDV7 Dxabon0C1LxS/ehVKF/FZLWH2olJaUs4OL4MZSbW8OmJdqX4giNWvxx6V2fe2HlEXk76 qjkLcNxvZjoForg1UAe0W3Em8AMASGZpwZawDJgEta3zudROO03n89xEgsiO4Pm0OUWV L44EMWa5udGFIhkiRXhURJ3izBX9RrsEaZd9k8blXZY1Ta3vf1raia1L7dIY7SeZERPr ZU9nZ4IiUraCw3KyNQqHXPwGH7jvZAN1z5i2mwn8IHjnBoao8S2KUUeZ7rFjGHUg96em f3XQ== X-Gm-Message-State: AG10YOSBugj9yE1D0+lFlY0vzIwtlXBjurBroROTPlInT1KgP2AkiDTHNQB0DLrJ3GN7aA== X-Received: by 10.98.72.202 with SMTP id q71mr31515023pfi.69.1454808892476; Sat, 06 Feb 2016 17:34:52 -0800 (PST) Received: from algz ([2600:8801:f900:f34:21e:65ff:fe80:25f6]) by smtp.gmail.com with ESMTPSA id fa3sm33704256pab.45.2016.02.06.17.34.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2016 17:34:51 -0800 (PST) From: Mitchel Humpherys To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> Date: Sat, 06 Feb 2016 17:34:49 -0800 In-Reply-To: <87oabu9fwh.fsf@smart-cactus.org> (Ben Gamari's message of "Sat, 06 Feb 2016 13:34:06 +0100") Message-ID: <87zivd8fra.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Feb 06 2016 at 01:34:06 PM, Ben Gamari wrote: > Mitchel Humpherys writes: > >> On Fri, Sep 25 2015 at 03:45:56 PM, Ben Gamari wrote: >>> Arguably `git rebase` should be holding the `index.lock` for the entire >>> duration of the process (or be more resilient to the lock being taken) >>> but sadly this isn't the case. Emacs should behave appropriately to >>> accomodate this behavior. >> >> I don't think this is quite right. As I understand it, git only takes >> index.lock for operations that mutate the index [1]. >> >> It wouldn't make sense for git to hold index.lock for the entirety of >> the rebase operation since you can stop in the middle of an interactive >> rebase and do anything you want (mess with the index, add new commits, >> anything). >> > Ahh, yes. You are quite right. > >> I think the real question is: why is vc-find-file-hook (or >> vc-refresh-state) trying to mutate the index? Shouldn't refreshing a >> buffer be a read-only operation (at least with respect to the VCS)? >> > As far as I can tell vc-find-file-hook is merely calling `git ls-files > -c -z -- $FILE`, which sounds to me like it should indeed be a read-only > operation. I'm able to reliably reproduce this on the tip of the emacs-25 branch with emacs -Q with: $ cd /path/to/emacs $ ./src/emacs -Q lisp/*.el [ M-x global-auto-revert-mode ] $ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" >> $f; done; git commit -am "test $i"; done You might need to increase the `30' value in order to see it happen depending on your disk speed, etc. I took a quick look at the git source and the main source of this particular error seems to be from the `git update-index' command. I see that vc-git.el is calling `git update-index' in a few places but my attempts at instrumenting the code to track down where it was coming from were fruitless. I tried: (setq vc-command-messages t) as well as: (defun vc-git-command (buffer okstatus file-or-list &rest flags) "A wrapper around `vc-do-command' for use in vc-git.el. The difference to vc-do-command is that this function always invokes `vc-git-program'." (let ((coding-system-for-read vc-git-commits-coding-system) (coding-system-for-write vc-git-commits-coding-system)) + (message "git: %s %s" file-or-list flags) Any ideas on how we can trace every git command that vc-git.el is running? I'm suspicious that we're calling `git update-index' in the auto revert path somewhere... From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 00:03:46 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 05:03:46 +0000 Received: from localhost ([127.0.0.1]:36251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHVi-0006K9-79 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 00:03:46 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:33043) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHVg-0006Jv-Bf for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 00:03:44 -0500 Received: by mail-pf0-f173.google.com with SMTP id w123so91804665pfb.0 for <21559@debbugs.gnu.org>; Sat, 06 Feb 2016 21:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=nlyWiwhcbeeREGrq/0oqQHqszBwv01E5PtdO0BlU6aY=; b=lQyOC73Gpnqv6hFtbbfnw4/g5iVQ0LkF3fiYj1CsrcDlUsH9Qf92O8DhJDd4a1CesW IFzqBMkZCGcOeuHk5cVdsHRkGi0MPxOpUlD3dLakbHSJE9A6uSpQ+lHYQjxfjL/Wd+SZ BLx+JglunaZQxEyyxDAnmlGi+HPxRo7Sb93hcNg6f832FgCyjOP0Viz/tyiAWZXrZADc whJJllIZH2KWZKbFNnzXBF9xoMhCqq6nWgju5xY6LU3xxt1ZLV9H1S8lhsvwjqews6Ei OhgNDVkuQwAMV3N2dVklUUdE0FYpwRdKsuJd1sKFlinozOuMOub+17xY21V/ajubY6nQ KCrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=nlyWiwhcbeeREGrq/0oqQHqszBwv01E5PtdO0BlU6aY=; b=Ii76SGQGVfeZ7vOGWdZ9sNba0vaedy8SZ+e7aVclHHNJiHsj5QSPNAd7iP+nrx22kh BqRXOGjXYotbzerWvglp0sctyTLYunl6xlcGmLRP/bXG6TmtxPu6DDGfsohPMUnSWyCg s4VNAKJeKERXkPBK7TY3j6HA/vhgkKGbLR2gopbQBlz6MrqptXItCv1en6thyHo9vqLt N6ccu7EGPh1hd5S2b9Q2ciGC0EwCFH6Z2kGx1ato2lFQecIuXUzAY3AYiCFKrDLs2WnS NNDZmK5eXWoD8ms4rfED3zGhMwxNuG2XZKvAfahlLhu6WZ6Kc3zJjH5oqr7dcbvQqR83 eKlg== X-Gm-Message-State: AG10YOSVF5W7C7TKLRbQPptWScAkC5q0Qr/qEDMBDMBTpDLv6e/hGNDOxpb0+gRr8iV8fg== X-Received: by 10.98.16.86 with SMTP id y83mr32247686pfi.45.1454821418313; Sat, 06 Feb 2016 21:03:38 -0800 (PST) Received: from algz ([2600:8801:f900:f34:21e:65ff:fe80:25f6]) by smtp.gmail.com with ESMTPSA id g10sm34323015pfd.92.2016.02.06.21.03.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2016 21:03:37 -0800 (PST) From: Mitchel Humpherys To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> Date: Sat, 06 Feb 2016 21:03:35 -0800 In-Reply-To: <87zivd8fra.fsf@gmail.com> (Mitchel Humpherys's message of "Sat, 06 Feb 2016 17:34:49 -0800") Message-ID: <87vb613ye0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Feb 06 2016 at 05:34:49 PM, Mitchel Humpherys wrote: > I took a quick look at the git source and the main source of this > particular error seems to be from the `git update-index' command. I see > that vc-git.el is calling `git update-index' in a few places but my > attempts at instrumenting the code to track down where it was coming > from were fruitless. I tried: > > (setq vc-command-messages t) > > as well as: > > (defun vc-git-command (buffer okstatus file-or-list &rest flags) > "A wrapper around `vc-do-command' for use in vc-git.el. > The difference to vc-do-command is that this function always invokes > `vc-git-program'." > (let ((coding-system-for-read vc-git-commits-coding-system) > (coding-system-for-write vc-git-commits-coding-system)) > + (message "git: %s %s" file-or-list flags) > > Any ideas on how we can trace every git command that vc-git.el is > running? I'm suspicious that we're calling `git update-index' in the > auto revert path somewhere... Sorry, I take it all back. `git update-index' is the source of that one particular index.lock error message, but it's certainly not the only thing holding index.lock... And actually it looks like `git ls-files' does take index.lock: $ cd /path/to/emacs/ $ git ls-files # in another shell after running the following inotifywait: $ inotifywait -m .git | grep index.lock Setting up watches. Watches established. .git/ CREATE index.lock .git/ OPEN index.lock .git/ CLOSE_WRITE,CLOSE index.lock .git/ DELETE index.lock .git/ CREATE index.lock .git/ OPEN index.lock .git/ CLOSE_WRITE,CLOSE index.lock .git/ DELETE index.lock I did a bit of git debugging and it looks like someone must be registering an atexit handler or something that takes index.lock, because it doesn't get taken in the ls-files code itself. It's taken sometime after the `exit' function gets called in `handle_builtin' in git.c. Anyways, I'm more inclined now to agree that this a git bug. I don't see why `git ls-files' would be taking index.lock... So we're back to the question of "how can Emacs handle this more gracefully". From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 00:21:44 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 05:21:44 +0000 Received: from localhost ([127.0.0.1]:36257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHn5-0006jh-QE for submit@debbugs.gnu.org; Sun, 07 Feb 2016 00:21:43 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33848) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSHn4-0006jW-Tj for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 00:21:43 -0500 Received: by mail-pf0-f171.google.com with SMTP id o185so91644984pfb.1 for <21559@debbugs.gnu.org>; Sat, 06 Feb 2016 21:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=yJTuwCgK9PLWGfBalSPJ3k+/v2Rwa/kNYYBcd6x/tFM=; b=Q6lMZ12jpZ2xn5qx/PoGZD1aiQnHLxQttWqbfvJX3KcqUfIBm9uFMekoSAon8m5jLb PusPOIrTG8r6LAkBxpdgX/bQgFndTPVKfda3DOGbSnZghh7h02Yie6aFCocR/ASU/Nit Znpmml3zbDNHW1KsHEeT0WxkESg8xZW1kSLRoPJbQw8DRhjB/3ZeCfWmp1mYFT6Cbw/p koHt+o5eJtW0ejlKe5lf0nFsn6GSsbsB+Ua7NqjKSpNfjHsnP8SmBFvPFDgMSiRr2JZ/ RbOU9Kpwb76AmBCOyLbLaiOwx+DA0qoRszlF7TxrxrIDk6UIpdUAQEQgv/U9o8bKHUWk BIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=yJTuwCgK9PLWGfBalSPJ3k+/v2Rwa/kNYYBcd6x/tFM=; b=XrG99vC4cA0y2GroMzETEQBRQK8zP3TEWT2+iycT3FS+vyySN2D4Arf9JhlqRiirj2 Rhv4AYAbyWGYoHf3kKK76UX1+HnRTO4cfJm1D0uPOOKJTh4aKbzz4vLJ+/0aEAHLBAg2 jav0TLEZ3v/nCT4WwzF1hcqykAZENBLa3FjADuwjnVGmzu7ntY387qZklqOVeGo+uD1b l4l3HnrKL2uxafpyWphiJ/4ByPghVaJkT/5YR4wlhhDrDlfRocscV0y30ZJSSOq0Fxze l8/GouFMlkHdr7l31nG9Y1G7f7FuqAqPH7gBJoDpccV+deSPfzrOpqdyJFJW5cUuO8nx SlFQ== X-Gm-Message-State: AG10YORxZJ6oP8ds67xhph2AfT0UxBf6o5t7eYWx2Eq2c44no8zYmr3+G9vPvXc3+T6qYw== X-Received: by 10.98.9.129 with SMTP id 1mr32762276pfj.163.1454822497073; Sat, 06 Feb 2016 21:21:37 -0800 (PST) Received: from algz ([2600:8801:f900:f34:21e:65ff:fe80:25f6]) by smtp.gmail.com with ESMTPSA id m86sm34485733pfi.27.2016.02.06.21.21.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2016 21:21:36 -0800 (PST) From: Mitchel Humpherys To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> Date: Sat, 06 Feb 2016 21:21:34 -0800 In-Reply-To: <87vb613ye0.fsf@gmail.com> (Mitchel Humpherys's message of "Sat, 06 Feb 2016 21:03:35 -0800") Message-ID: <877fih3xk1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sat, Feb 06 2016 at 09:03:35 PM, Mitchel Humpherys wrote: > On Sat, Feb 06 2016 at 05:34:49 PM, Mitchel Humpherys wrote: >> I took a quick look at the git source and the main source of this >> particular error seems to be from the `git update-index' command. I see >> that vc-git.el is calling `git update-index' in a few places but my >> attempts at instrumenting the code to track down where it was coming >> from were fruitless. I tried: >> >> (setq vc-command-messages t) >> >> as well as: >> >> (defun vc-git-command (buffer okstatus file-or-list &rest flags) >> "A wrapper around `vc-do-command' for use in vc-git.el. >> The difference to vc-do-command is that this function always invokes >> `vc-git-program'." >> (let ((coding-system-for-read vc-git-commits-coding-system) >> (coding-system-for-write vc-git-commits-coding-system)) >> + (message "git: %s %s" file-or-list flags) >> >> Any ideas on how we can trace every git command that vc-git.el is >> running? I'm suspicious that we're calling `git update-index' in the >> auto revert path somewhere... > > Sorry, I take it all back. `git update-index' is the source of that one > particular index.lock error message, but it's certainly not the only > thing holding index.lock... And actually it looks like `git ls-files' > does take index.lock: > > $ cd /path/to/emacs/ > $ git ls-files # in another shell after running the following inotifywait: > $ inotifywait -m .git | grep index.lock > Setting up watches. > Watches established. > .git/ CREATE index.lock > .git/ OPEN index.lock > .git/ CLOSE_WRITE,CLOSE index.lock > .git/ DELETE index.lock > .git/ CREATE index.lock > .git/ OPEN index.lock > .git/ CLOSE_WRITE,CLOSE index.lock > .git/ DELETE index.lock > > I did a bit of git debugging and it looks like someone must be > registering an atexit handler or something that takes index.lock, > because it doesn't get taken in the ls-files code itself. It's taken > sometime after the `exit' function gets called in `handle_builtin' in > git.c. > > Anyways, I'm more inclined now to agree that this a git bug. I don't > see why `git ls-files' would be taking index.lock... So we're back to > the question of "how can Emacs handle this more gracefully". SORRY! I take it all back AGAIN. It was actually my shell's PS1 that was locking index.lock (due to a `git status'), not `git ls-files'! That's why it looked like it was happening when the program exited. Because it really was after the program exited :). That's embarassing... After re-running my experiment above in a non-fancy shell I don't see index.lock being taken at all when I run `git ls-files'. So we're back to instrumenting vc{,-git}.el to see exactly which git commands are being run when auto-revert refreshes a buffer. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 05:22:37 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 10:22:37 +0000 Received: from localhost ([127.0.0.1]:36470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSMUH-0005Hs-M0 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 05:22:37 -0500 Received: from mail.smart-cactus.org ([54.187.36.80]:45629) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSMUG-0005Hg-Jd for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 05:22:36 -0500 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 534D340516; Sun, 7 Feb 2016 10:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1454839713; bh=4GbxD45VhCL38sw2oKATLhTaFRVethW9oLOEK1IiBRY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TBgzZqzjxV9W5vSUvR/QKMen3SDbeMAEAdPL8vy7eCHmN/ASbLgijDAFFrxeX6adu t+OHI8DmM0Ppf2sOwIAEgDNM24OZ1DJwxOShnb9iP0vG/2Uaap0A2WAzg27xxNZLQL 37YmAQlkOb5Xm4kbmPOZ+WEthJy4jKsnNBpouei0= From: Ben Gamari To: Mitchel Humpherys Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: <877fih3xk1.fsf@gmail.com> References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> <877fih3xk1.fsf@gmail.com> User-Agent: Notmuch/0.21+24~gbceb651 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-pc-linux-gnu) Date: Sun, 07 Feb 2016 11:22:08 +0100 Message-ID: <87d1s8akhb.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain Mitchel Humpherys writes: > So we're back to instrumenting vc{,-git}.el to see exactly which git > commands are being run when auto-revert refreshes a buffer. I recently revisited this and came up with this hack (after realizing that my previous tracing approach was badly broken), (defun my-tracing-function (orig &rest args) (message "call-process %s" args)) (advice-add 'call-process :before #'my-tracing-function) (message "installed") This produces, call-process (nil (t nil) nil ls-files -c -z -- COPYING) call-process (nil (t nil) nil rev-parse HEAD) call-process (nil (t nil) nil symbolic-ref HEAD) call-process (nil (t nil) nil diff-index -p --raw -z HEAD -- COPYING) call-process (nil (t nil) nil status --porcelain -- COPYING) call-process (nil (t nil) nil ls-files -c -z -- COPYING) call-process (nil (t nil) nil rev-parse HEAD) call-process (nil (t nil) nil symbolic-ref HEAD) call-process (nil (t nil) nil diff-index -p --raw -z HEAD -- COPYING) call-process (nil (t nil) nil status --porcelain -- COPYING) Quit call-process (nil (t nil) nil ls-files -c -z -- COPYING) After stracing each of these I've found that status --porcelain indeed takes index.lock. Unfortunately I can't find a good explanation of why this is necessary. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWtxrQAAoJEHPt6ejPuu8BbYYIALWE7aHsJBJcCMq/GicVWvcu nMDyHiKmd384wSE7gGYL02AE9r+Dc2ClGvcGA1Lpr3vJOEyrST/zhRWrW+1GVJIV PEpfQ4uxsGTGaMuzE39AmTt1BlCusT5wbSebd0hn96r0KXN5JnYmePRu0YR6da6N WVhDpQ4apkavEK6+W0zdeEMol4ktUJQ2or15lLhk6zcBht/lN0Mi+ewFuXdZ9SgP wH87sbjfBhpykNoqX/krCWTO10Rpn9T/1nF0OeTcKlt91oICVFLyKnly4lZaEgVv r3iM5eWg7KIn8PHDZl+6STEr9mAqpC0HQ5ZUCHk5sp875dzsmRU0Q5GuR8A/bBg= =F7tQ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 05:55:21 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 10:55:21 +0000 Received: from localhost ([127.0.0.1]:36478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSMzx-00065L-LN for submit@debbugs.gnu.org; Sun, 07 Feb 2016 05:55:21 -0500 Received: from mail.smart-cactus.org ([54.187.36.80]:45632) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSMzw-000659-Ar for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 05:55:20 -0500 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 0A1EB40516; Sun, 7 Feb 2016 10:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1454841677; bh=SWDLF2aOi4TgzF5Qb5zOg/VSY0sKGSxx/nlaTPKLdr4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=iwTM0EJ/38tXUefo3gxqW3sxoYjbDWnab4pK9SoUFtV6hSFargATQGPpDUwLlU2PN aR73AEKtWflr7l4D6/8+1Yn2gzCkYEReIUTRazYOdS7WHsWvJanbRsRKjhcKanoS1M UG9DPcMT8fQG4pdfM5uTQuHmQMlqwGn61wf+WCcA= From: Ben Gamari To: Mitchel Humpherys Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: <87d1s8akhb.fsf@smart-cactus.org> References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> <877fih3xk1.fsf@gmail.com> <87d1s8akhb.fsf@smart-cactus.org> User-Agent: Notmuch/0.21+24~gbceb651 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-pc-linux-gnu) Date: Sun, 07 Feb 2016 11:55:07 +0100 Message-ID: <878u2waiyc.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I've spoken with some folks in #git about this issue. * the index lock is held "because it needs to read the index and compare it to the worktree. If it doesn't take the index lock, other things could change either the index or the worktree underneath it, making git status lie (or even crash)" =20=20=20 * It sounds as though a patch refactoring `git rebase` such that it holds the index lock may be considered, although this is a non-trivial refactoring as `rebase` is currently a shell script * One option would be to check whether a rebase is in progress before auto-reverting. In pseudo-shell, if [ -e .git/rebase-apply ] || [ -e .git/rebase-merge ]; then do_not_call_git_status_because_we_are_rebasing; else auto_revert fi Unfortunately it sounds like this wouldn't do the right thing when a rebase pauses due to conflict (when you'd ideally want to auto-revert). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWtyKLAAoJEHPt6ejPuu8BG6gIAJYUPQ/9n66pKpDGd6q+JDXW OMJUsutKJ0eKj+yJoeImGRc5a3kOkZMwgx9WCA0jQkSEg8n1GbBi9dGKGLgXUWAo K5W6trekFl1A/TFJm6W8yf6TxLTzHhdyJcf0XIKufP2Uxho6x7nM5kPIoKaDYrpx tvfUHevTLpiltlHclQnTdwqyt8wex05mXCmjszfCSiDwYvKWRBPiciQ4pRTkdL3I sgj8vSYYFQ41R1GN85UxhYIrARz/G1m7FdVX6ZN0EibYh27bGDbEpBUDaIsTbtC3 mcGtFxvK1tBQ/k2lz5OY5MudzTH0c+a9/LOrmb77r8l9XQT9SSrGaC+FKeXguIU= =lIie -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 12:06:10 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 17:06:10 +0000 Received: from localhost ([127.0.0.1]:37382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSSmo-00018J-6c for submit@debbugs.gnu.org; Sun, 07 Feb 2016 12:06:10 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:33609) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSSmn-000188-DG for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 12:06:09 -0500 Received: by mail-pa0-f51.google.com with SMTP id cy9so61246379pac.0 for <21559@debbugs.gnu.org>; Sun, 07 Feb 2016 09:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=3/Tgt4la11E4WKJTih06w8B2wCCRKLitvCCtpTGw/9s=; b=Dy7N5X/2VqHeWPyo1h9UoA6cvRD0J3fQirkJO9O8epWmf7l/oHgIeFkRrwxommORCM ypNB22HNrywmiv/j2GWJwJVXZg+sowD8fpNBN6qJjV05GtPFHNy7Se71F0eQegPHCt5A WLEk2gN//VaxtayDE5l96PEAAamgRj62xc4aF4AUUjf37d4X/ADwaL8aYFoqwOb2zv2G 1d11aNv3v8VS+7VUUkR+HBRwUaHfIhOYUDI/v27epsN4XOvnp5IDw6AReKPQIAfcyAgK NzwSDqsbJb+wHMTyT4WakXoC04yJ3JNjW1UYTStugasCEXn6sBPqzm40dvlzNHxRVBVC WPqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=3/Tgt4la11E4WKJTih06w8B2wCCRKLitvCCtpTGw/9s=; b=WzxHnrmdGZBLoyQoxUs3hlhXTSuZAVXQ7q1AB3oLil/IVTM6V0Zly3AFvpex9EDX97 8TRh7DFYzMoVcR1gBfaqfoA1PqrKS6VqY/D7ckBywbiKEl3tY3A3KcWjK7fVogIbt4zr BBTJWo+mjfKeiTWRG6GEX6DIw8Fjt9hPnOkHzXPtF+B3ym+5qzpws7j89k+/c97chJMs AM1vrrcuHDY4e8NvqqxjlYbN6kJ+LQlTsem7YChFj1vCfAVfqpR+LSkEz3ojOAfnIwYF qZozLbXX1i507zZvyNuipF4BRCgUB4BfRJw/AXqiIMkDVGZr8/onNa+/n/FyHm0L0GUu yBUg== X-Gm-Message-State: AG10YOT5uSA4XgW9tyiu5/8eyosTC/ZplUrWHbYAVWBg8b9QACniR+xIC8t1tRNMu6oXmw== X-Received: by 10.66.235.162 with SMTP id un2mr35817649pac.17.1454864763847; Sun, 07 Feb 2016 09:06:03 -0800 (PST) Received: from algz ([2600:8801:f900:f34:21e:65ff:fe80:25f6]) by smtp.gmail.com with ESMTPSA id xv2sm37694494pab.10.2016.02.07.09.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Feb 2016 09:06:02 -0800 (PST) From: Mitchel Humpherys To: Ben Gamari Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> <877fih3xk1.fsf@gmail.com> <87d1s8akhb.fsf@smart-cactus.org> <878u2waiyc.fsf@smart-cactus.org> Date: Sun, 07 Feb 2016 09:06:01 -0800 In-Reply-To: <878u2waiyc.fsf@smart-cactus.org> (Ben Gamari's message of "Sun, 07 Feb 2016 11:55:07 +0100") Message-ID: <874mdkwiva.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, Feb 07 2016 at 11:55:07 AM, Ben Gamari wrote: > I've spoken with some folks in #git about this issue. > > * the index lock is held "because it needs to read the index and > compare it to the worktree. If it doesn't take the index lock, other > things could change either the index or the worktree underneath it, > making git status lie (or even crash)" Makes sense... > * It sounds as though a patch refactoring `git rebase` such that it > holds the index lock may be considered, although this is a > non-trivial refactoring as `rebase` is currently a shell script > > * One option would be to check whether a rebase is in progress before > auto-reverting. In pseudo-shell, > > if [ -e .git/rebase-apply ] || [ -e .git/rebase-merge ]; then > do_not_call_git_status_because_we_are_rebasing; > else > auto_revert > fi > > Unfortunately it sounds like this wouldn't do the right thing when a > rebase pauses due to conflict (when you'd ideally want to > auto-revert). Yeah that would definitely be a problem. The other problem with this is fix is that it wouldn't fix any other use case that locks the index, like my repro earlier: $ cd /path/to/emacs $ ./src/emacs -Q lisp/*.el [ M-x global-auto-revert-mode ] $ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" >> $f; done; git commit -am "test $i"; done There's no rebase there, so detecting a rebase to skip auto-revert wouldn't help... Hopefully we can get rid of the `git status' from the auto-revert path altogether. It looks like the only place we do a `git status' is in `vc-git-conflicted-files'. We call that from `vc-git-find-file-hook' to see if we should start smerge. But I don't see how we get there from auto-revert. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 07 12:23:08 2016 Received: (at 21559) by debbugs.gnu.org; 7 Feb 2016 17:23:08 +0000 Received: from localhost ([127.0.0.1]:37390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aST3D-0001WB-W7 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 12:23:08 -0500 Received: from mail.smart-cactus.org ([54.187.36.80]:45634) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aST3C-0001VU-9U for 21559@debbugs.gnu.org; Sun, 07 Feb 2016 12:23:06 -0500 Received: from localhost.localdomain (HSI-KBW-149-172-43-78.hsi13.kabel-badenwuerttemberg.de [149.172.43.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: ben@smart-cactus.org) by mail.smart-cactus.org (Postfix) with ESMTPSA id 9CF124054A; Sun, 7 Feb 2016 17:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.smart-cactus.org; s=mail; t=1454864943; bh=oNpY+Fwfs0keBlaNVAPTbv4Ivv8WufL5p6s/EEuVSzg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FikUXaeKfnLoMS6holgxVN3h//MrXlmrbeXkDv0fI46+Jdrd2be7NskKT3Z92GYDO VWudphyIPAPaacsqWPanZJCYwoGzrlBuogvtr4qFm/KB+x+m7c1wOxziPkc9BdnNnI 912lYK/roTqo7PYZct8+ONOvxvSpmag8AY5iZH6s= From: Ben Gamari To: Mitchel Humpherys Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase In-Reply-To: <874mdkwiva.fsf@gmail.com> References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> <877fih3xk1.fsf@gmail.com> <87d1s8akhb.fsf@smart-cactus.org> <878u2waiyc.fsf@smart-cactus.org> <874mdkwiva.fsf@gmail.com> User-Agent: Notmuch/0.21+24~gbceb651 (http://notmuchmail.org) Emacs/25.1.50.1 (x86_64-pc-linux-gnu) Date: Sun, 07 Feb 2016 18:22:53 +0100 Message-ID: <874mdka102.fsf@smart-cactus.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --=-=-= Content-Type: text/plain Mitchel Humpherys writes: > There's no rebase there, so detecting a rebase to skip auto-revert > wouldn't help... > Indeed. This is a good point. > Hopefully we can get rid of the `git status' from the auto-revert path > altogether. It looks like the only place we do a `git status' is in > `vc-git-conflicted-files'. We call that from `vc-git-find-file-hook' to > see if we should start smerge. But I don't see how we get there from > auto-revert. I believe the path is, auto-revert-handler vc-refresh-state vc-call-backend 'file-life-hook vc-git-find-file-hook I'm not sure whether it is possible to eliminate the `git status' call. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWt31tAAoJEHPt6ejPuu8BlTkIAIoe3PkSISTNH/vhj8I9VUDn LQIZJ/N14KlSGrQRxgHgeRAkOsv+2/HHEymfeC7UvY27c3wzlI0C8nhiAAp2+6C2 uSSqh8RZ9qgMIcB1jNocYJRdecQUDQv20NUpQgpNfiEHSx78T3LVM6C+G8ttUfNw kH0hLnuDVRBAkBAdnuRErVuzckf8QU7felYx6R5BMvkHHkT2UGMx9lzvr+6TQIt7 N1cl9f2okhcn/QhgbvU8Ck5jb8ZC0opmYl/R9otR74vko3kpTDO1GkYXNatMtnJp 5Tai9KBhLsa/6HmJQEO31+FWuYpc1PFEzV41ja2u4sTAu0MlH8bkudF3TkOEJAE= =IzdA -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 08 16:20:01 2016 Received: (at 21559) by debbugs.gnu.org; 8 Feb 2016 21:20:02 +0000 Received: from localhost ([127.0.0.1]:60570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aStE1-0006t3-EB for submit@debbugs.gnu.org; Mon, 08 Feb 2016 16:20:01 -0500 Received: from dancol.org ([96.126.100.184]:44440) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aStDz-0006so-71 for 21559@debbugs.gnu.org; Mon, 08 Feb 2016 16:19:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject; bh=FZ0FY9WrTFKJY6ANeqVl12hxdGivKDTHM7gNxntAiuU=; b=nkUrKduWmOjEK0GCDEKIzqL0w623N+nfrDsdcOErc8txm26ZCVjzDew+7su09WHMpnrMBdQTRjViSPuPZRsT1HbvvuL1XJXCnDLtNFe3HjlVrxJMiOrrosf1YNFo5wqKdgYUpzwqY454TYVlGUBGaSTvt4i/m8dB1gDt89zhDakQMxt0gkVWtdZE5mfNkfE+Wq4EVd45zLxxGUN6Ok3OKymXVVaZ6orpy9of+Hg+iMzApwTGaunvCKoq66cT98v30MvD1THytTGniYQPKcc0ss3fy9nrkY9T8ryNmDGZ9/Q/05QmwhiW2YGPmmUyktl1MCeYupeR+YE+AkMpQydlSg==; Received: from [2620:10d:c090:200::9:5509] (helo=[IPv6:2620:10d:c083:10fb:2ab2:bdff:fe1c:db58]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1aStDy-0006Ud-61; Mon, 08 Feb 2016 13:19:58 -0800 Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Ben Gamari , Mitchel Humpherys References: <87wpvebraz.fsf@smart-cactus.org> <87oabu9fwh.fsf@smart-cactus.org> <87zivd8fra.fsf@gmail.com> <87vb613ye0.fsf@gmail.com> <877fih3xk1.fsf@gmail.com> <87d1s8akhb.fsf@smart-cactus.org> <878u2waiyc.fsf@smart-cactus.org> From: Daniel Colascione Message-ID: <56B90678.9040103@dancol.org> Date: Mon, 8 Feb 2016 13:19:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <878u2waiyc.fsf@smart-cactus.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ApWt17Jfk2oXBx8JBcSdglAEMrU7GrpH4" X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ApWt17Jfk2oXBx8JBcSdglAEMrU7GrpH4 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 02/07/2016 02:55 AM, Ben Gamari wrote: > I've spoken with some folks in #git about this issue. >=20 > * the index lock is held "because it needs to read the index and > compare it to the worktree. If it doesn't take the index lock, other= > things could change either the index or the worktree underneath it, > making git status lie (or even crash)" > =20 > * It sounds as though a patch refactoring `git rebase` such that it > holds the index lock may be considered, although this is a > non-trivial refactoring as `rebase` is currently a shell script This problem is really a git bug. For any VCS, I should be able to, in one terminal, run while true; do $VCS status; done and in another terminal, run $VCS any-damn-operation and not cause repository corruption or mysterious operation failures. Maybe it's a good idea for Emacs to work around this particular bug in git, but there is nothing semantically wrong with what vc-git is doing he= re. FWIW, whatever its other faults, hg at least operates correctly here. --ApWt17Jfk2oXBx8JBcSdglAEMrU7GrpH4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJWuQZ4AAoJEN4WImmbpWBl3XoQAIWxaTrV2gdV/rqM0KAYVjEd 0eNMlXCpe3DM8tP3rRX9Wp+b6dXwyqAEpi4bZjEVEriFydDuFkVmUwPAxRsz7y4c wzcnxoMT+QPjRD8mMmZ1NLfPdd8fQssNBZMyZv1jUS7A8YHmICy2j4GD9tRYpwZS B/KUHQdovTPpO4cNcoTeMNPRHPyoHx/ppBICD7TSkZEI9QoK72OptT6INnhuFNP1 MNr+Rua/w1F27IopcC5D4b72sSJ0EKHdcBs36Em3V3Phkfvlm50S1iCPgNG/5V0i uYaIUuoqEPikq5N5V9/okmxDwliEQk24eWs21VK2dslgO8z7zTJTmocTmOqKrKum cDAF9tHuTBrPRgFPeIdqlFKg+iKWk4k1z6d9MrEBgPrS1Hck5U3ElkqLFtLmjOD2 iHAgoVAmkmNIDKI6VRIIUX8+2kAgwa/U+NTZyK6Fnp9UZFsKXyNRNpUUl+5Erizh H720PTdxStO7VUgLvH6VI7lX4xznpE3jTe6gaSWBFOxunfZJWwwdtOndNUvOKM8F QC962RLm4c0pwnvFWyY+0NF4VeMrxLId13r0sW4M2MnnDV8KUs5g2ixYTWQOcDkP QbzuGu0J19oxbSJ5mfmA/+qlMt9lYjahN3cYheYiKn/LqvGLts8WK8oWK34nCBrf hj8Gn6vjxNNZOBmKQN7J =tJxG -----END PGP SIGNATURE----- --ApWt17Jfk2oXBx8JBcSdglAEMrU7GrpH4-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 09 17:13:05 2016 Received: (at 21559) by debbugs.gnu.org; 9 Sep 2016 21:13:05 +0000 Received: from localhost ([127.0.0.1]:54943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biT6e-0001Wc-VJ for submit@debbugs.gnu.org; Fri, 09 Sep 2016 17:13:05 -0400 Received: from mail-oi0-f54.google.com ([209.85.218.54]:35699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biSqv-00017M-TJ for 21559@debbugs.gnu.org; Fri, 09 Sep 2016 16:56:50 -0400 Received: by mail-oi0-f54.google.com with SMTP id c192so4673735oih.2 for <21559@debbugs.gnu.org>; Fri, 09 Sep 2016 13:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=e4EwKoAgzWla7Zc4w4RA5I+LcGVEn3POiV6wcOt7Cbc=; b=s7GHqsBdhbX8wnFscVmbsFYAROGesbSgLkCt1ShJQmv9ewfXDdsoZXRQk1gtdHuP5T SpSGB7iP8e6zIj0ZKq7jmeR3X4Eaxw2etqG3YU2fd+O9b+H6/pE2hoY5LmOaAd4vKrb4 mL10JjJqdFuWR3hveUcpgJ5PmGp95rn16Dhv2W683qkEC6TcZzHMsJ3ssRNitcKFuYv7 6fmWWnNdSRvoKgw0RfXfGT8+KYs5i6pBDvdz6wjtnkC8uejZ8x+LG1ClGnEJPiNQJ1L9 sXFK1pcLeheT5P5BJ+VvADwTm6u8XqimH06X/yerYe++qCPTJxIZNQe2d30IzZVSXUCi SEZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=e4EwKoAgzWla7Zc4w4RA5I+LcGVEn3POiV6wcOt7Cbc=; b=Dp8x7ft+htRG5emBpZmJGM2WHId0u6x7Momw1SjbGgZGUBY+RbTXuK4lQrS6ZZ75Jn jAGC+9zeseB5FWy2Qj5pflbkZD7EHPGeJpe/d+XkmwG8a1T12oZdw5DYoe/qYYb9OlOG 17vusde01ktdXGFbDkVg+9+vJCod1t/7jMPk1KfRt2ZPDt3QtyBZAjLfn2wn2V+m+nuL KePtq4C27FIAWCQtVt76Tc9sJPrpAyieWBAbklGpUUSFV46aSjqvkj65GGoo+QeZNkH8 YYmncrT9QqoqXJqHM1FddRIygXyteF2DLaIcPkLv6lNE3KYny1G8YwvGKysqvYGBoFhp 5Qdw== X-Gm-Message-State: AE9vXwNkQcPUVk1uYXgtCAkxBKRA9O0NPZRBOwRA7YApjIL1h7vFyBABA4PEpimc0qa6XZnmpH07vWPv7CwveA== X-Received: by 10.202.117.149 with SMTP id q143mr9606920oic.64.1473454603876; Fri, 09 Sep 2016 13:56:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.203.194 with HTTP; Fri, 9 Sep 2016 13:56:23 -0700 (PDT) From: Jason Merrill Date: Fri, 9 Sep 2016 16:56:23 -0400 Message-ID: Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001a1134fcba41c498053c1962a4 X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The problematic invocation of git status comes from (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status (vc-git--run-command-string directory "status" "--porcelain" "--")) [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.4 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.218.54 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.218.54 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jason.merrill[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.54 listed in wl.mailspike.net] 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 21559 X-Mailman-Approved-At: Fri, 09 Sep 2016 17:13:04 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The problematic invocation of git status comes from (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status (vc-git--run-command-string directory "status" "--porcelain" "--")) [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.4 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [209.85.218.54 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.218.54 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jason.merrill[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.218.54 listed in wl.mailspike.net] 0.0 HTML_MESSAGE BODY: HTML included in message -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --001a1134fcba41c498053c1962a4 Content-Type: text/plain; charset=UTF-8 The problematic invocation of git status comes from (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status (vc-git--run-command-string directory "status" "--porcelain" "--")) I'm working around this issue by changing vc-git-conflicted-files to use diff-files --name-status, which doesn't lock the index: (defun vc-git-conflicted-files (directory) "Return the list of files with conflicts in DIRECTORY." (let* ((status (vc-git--run-command-string directory "diff-files" "--name-status")) (lines (when status (split-string status "\n" 'omit-nulls))) files) ;; TODO: Look into reimplementing `vc-git-state', as well as ;; `vc-git-dir-status-files', based on this output, thus making the ;; extra process call in `vc-git-find-file-hook' unnecessary. (dolist (line lines files) (when (string-match "\\([ MADRCU?!]\\)[ \t]+\\(.+\\)" line) (let ((state (match-string 1 line)) (file (match-string 2 line))) ;; See git-status(1). (when (equal state "U") (push (expand-file-name file directory) files))))))) --001a1134fcba41c498053c1962a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The problematic invocation of git status comes from
(defun vc-git-conflicted-files (directory)
=C2= =A0 "Return the list of files with conflicts in DIRECTORY."
=
=C2=A0 (let* ((status
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vc= -git--run-command-string directory "status" "--porcelain&quo= t; "--"))

I'm working around t= his issue by changing vc-git-conflicted-files to use diff-files --name-stat= us, which doesn't lock the index:

(defun = vc-git-conflicted-files (directory)
=C2=A0 "Return the list = of files with conflicts in DIRECTORY."
=C2=A0 (let* ((status=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (vc-git--run-command-string d= irectory "diff-files" "--name-status"))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lines (when status (split-string status &qu= ot;\n" 'omit-nulls)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= files)
=C2=A0 =C2=A0 ;; TODO: Look into reimplementing `vc-git-st= ate', as well as =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 ;; `vc-git= -dir-status-files', based on this output, thus making the =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2= =A0 ;; extra process call in `vc-git-find-file-hook' unnecessary. =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0
=C2=A0 =C2=A0 (dolist (line lines files)
=C2= =A0 =C2=A0 =C2=A0 (when (string-match "\\([ MADRCU?!]\\)[ \t]+\\(.+\\)= " line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((state (match-stri= ng 1 line))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (fil= e (match-string 2 line)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; S= ee git-status(1). =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (equal state "U= ")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push (expand-f= ile-name file directory) files)))))))

--001a1134fcba41c498053c1962a4-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 14 11:29:37 2018 Received: (at 21559) by debbugs.gnu.org; 14 Feb 2018 16:29:37 +0000 Received: from localhost ([127.0.0.1]:43059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elzw8-0001By-RB for submit@debbugs.gnu.org; Wed, 14 Feb 2018 11:29:37 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:55677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elu08-0006tH-41 for 21559@debbugs.gnu.org; Wed, 14 Feb 2018 05:09:20 -0500 Received: by mail-wm0-f47.google.com with SMTP id a84so10175822wmi.5 for <21559@debbugs.gnu.org>; Wed, 14 Feb 2018 02:09:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=z4s3To81GSXtqPAqxDrfWpurYf0BxZI2Moj7rEhjGe0=; b=SYVuvu6iWH7WU7JwbmLjlQ6lReWslSb5MmOB74/wS7f6IcOOtIJVmyBl7prwwUN7ii VgdrqtcqlB4cqVV21a7b3rdE2hmDX5Z3WGJcBwG0cGjn2TSzIVdG/tjshhxlGT0EdYxy 0xkm7pkCMCXDgVpwYUj3kqMi0t/RqLSUW3IhlSD5JPVy6U6PLd9xsT4WF5bqr57hVacT S/loUl4hSX2LFTOj2T0qMhv5gDp0H2p6WegypkhJesPVBmXmQ5MCMgCgPc12v3b5GMna 9kJRzHsaALTpVxP+yBWHOIMAUJz0DMNAMCRiTdc+7plVEqTeAC0VLUgIT00LYFpeAV2r uZpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=z4s3To81GSXtqPAqxDrfWpurYf0BxZI2Moj7rEhjGe0=; b=mv1fwzcvt+3q8ZIJkGDXjutt1f+JzfEuslEMAvPOogNUQMoEf5w5CHdlYVcWE6wIkH Xl+VwkNe4B/ArMAkxca931y7q+zSf6pe8RLN7Sp8sWrzSkpovpJe1dM3Tm4uDIN/Chfx EusUobROPdFeh1ewOz37LQ2qlipevQAsI366Tnxt9g3XZQaz2IvLGGB41jnHxW1bv34m wD0BsrzBFU5F+0eY3FT1TwT6hrFwFyAoH6FniGytMK/gEuvC2AEdUWEwLJQm3iLJni4K JHc9sT7EEd1RQA2EP6fowPtIhES5sEBkCQTOLn8Qiu7vjAdmmu68d4arWoihE/EmQS0b WNQw== X-Gm-Message-State: APf1xPCG7y6pJEKpFiaQ7N+vOLRQvkzUy3px0rF0jUzyua74YB6nPABR Td0X9HGFd+duv8xZfe5jizqXZnzQMLBn3L5KErAyjw== X-Google-Smtp-Source: AH8x2264kR4KZtRFnrXp3Bi4J/LZoA6qvir17jbmWYdnCGr5GKhVRR3/PGa3cFbKQgKIu7S+PKU6BdCPkrO5P9Z5X3w= X-Received: by 10.28.27.139 with SMTP id b133mr2098002wmb.29.1518602953928; Wed, 14 Feb 2018 02:09:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Wed, 14 Feb 2018 02:08:53 -0800 (PST) From: Alexei Khlebnikov Date: Wed, 14 Feb 2018 11:08:53 +0100 Message-ID: Subject: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/alternative; boundary="001a114b43ac9fb8030565294d3d" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 X-Mailman-Approved-At: Wed, 14 Feb 2018 11:29:35 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --001a114b43ac9fb8030565294d3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Since some version, Git supports "--no-optional-locks" switch and "GIT_OPTIONAL_LOCKS" environment variable for avoiding locking during "git status". That's how they are documented: ---------------------------------------- https://git-scm.com/docs/git#git---no-optional-locks --no-optional-locks Do not perform optional operations that require locks. This is equivalent to setting the GIT_OPTIONAL_LOCKS to 0. https://git-scm.com/docs/git-status#_background_refresh BACKGROUND REFRESH By default, git status will automatically refresh the index, updating the cached stat information from the working tree and writing out the result. Writing out the updated index is an optimization that isn=E2=80=99t strictl= y necessary (status computes the values for itself, but writing them out is just to save subsequent programs from repeating our computation). When status is run in the background, the lock held during the write may conflict with other simultaneous processes, causing them to fail. Scripts running status in the background should consider using git --no-optional-locks status (see git[1] for details). ---------------------------------------- Using this "--no-optional-locks" switch looks like a solution to the issue? --001a114b43ac9fb8030565294d3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Since some version, Git support= s "--no-optional-locks" switch and "GIT_OPTIONAL_LOCKS"= environment variable for avoiding locking during "git status&q= uot;.

That's how they are documented:

-------------= ---------------------------
https://git-scm.com/docs/git#gi= t---no-optional-locks

--no-opt= ional-locks

Do not perform optional operations that require locks. This is equivalent to setting the GIT_OPTIONAL_LOCKS to 0= .

https://git-scm.com/docs/git-status#_background_refres= h

BACKGROUND REFRESH

By default, git status will automati= cally refresh the index, updating the cached stat information from the work= ing tree and writing out the result. Writing out the updated index is an op= timization that isn=E2=80=99t strictly necessary (status computes the value= s for itself, but writing them out is just to save subsequent programs from= repeating our computation). When status is run in the background, the lock= held during the write may conflict with other simultaneous processes, caus= ing them to fail. Scripts running status in the background should consider = using git --no-optional-locks status (see git[1] for details).
---------= -------------------------------

Using this &q= uot;--no-optional-locks" switch looks like a solution to the is= sue?

--001a114b43ac9fb8030565294d3d-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 14:09:13 2018 Received: (at 21559) by debbugs.gnu.org; 15 Feb 2018 19:09:13 +0000 Received: from localhost ([127.0.0.1]:45107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emOu9-0004m3-7X for submit@debbugs.gnu.org; Thu, 15 Feb 2018 14:09:13 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emOu7-0004lq-Dw for 21559@debbugs.gnu.org; Thu, 15 Feb 2018 14:09:11 -0500 Received: by mail-wm0-f42.google.com with SMTP id x21so2811583wmh.0 for <21559@debbugs.gnu.org>; Thu, 15 Feb 2018 11:09:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=uq/pj9SWusxqeJOvIvommBkkP9nPb8ROASGBFHWO6hs=; b=LMlMvvwMiKU3uS3nGuUnMssFT4MFxKh0ya2yQBzNdSd/QYTzUOYLzBJ12ogS+PlKIg 9NlLSV7067ytbMrWMwpxAVlhDAGyzSNXAwH/D74kTC+Qndkl1Y2eYI9Mq49VGLjImTwk VkwP1/XAYAafzeQnKgwb08IlXpmxBeYi1zrR5fWvtOd3lqH7DHcNTmfy61EzVUY4ludj 4qQBIXu+JlPOMkhc77OIHquhfrNCGHenQfXK+9k7VVrKcFBe3ui4qaBb3L/Kfmoz03Em FlNe6UhcStKG1RN8vUkdbiqJn6nwNTK3FQY0bznnBwwyKrDwf6iduHI++THx4tNmXc5O nSZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=uq/pj9SWusxqeJOvIvommBkkP9nPb8ROASGBFHWO6hs=; b=uhA7kOjeiq6WT+XZLJpBAYXvzmE+r2tXCNTFO9secF2TAOqegBQgMviPiTsDUKjrnh N4GZWlyesClGDB6ucX8dXMhPobM4MYf4meuxxmBlYDkUBs47hmrBK+aXOcClNZV1CAzh hJdyLRslrcjrz6wWxRuFkOIk14j/CCXNumtysMl84Sa/hinCDwOrvXoeNl6pT1DwqYS7 HL41nc/hg/cq5WtLE98fXw1bQtL9tT81T6hnStJYzfpMfm3/p5F9943Blcxj9rc5QGIH aaB+aUJW8sFrwWcHGAMXFVYjJ4OGwpT2PFbwm3DuqX6pszU60A9eCMUERO8d/r6wirRS cCOw== X-Gm-Message-State: APf1xPCIvcpvsfACpzqFmar5DUzhfVloXAUct7PSTo2DPuYpQb9UFg5Z L8Dn76rfvnauIKmsInr9uOnyX/gNb0aa9zmjoF0w8A== X-Google-Smtp-Source: AH8x226JyYptWC2chT+Q9lqLrTHlZtpT8h2c3s5ngAW+vtGovCaVQPnKA6g5ix9wgRSm2rmFUZfujHSqA/ESghQQiPw= X-Received: by 10.28.49.212 with SMTP id x203mr3020771wmx.28.1518721745342; Thu, 15 Feb 2018 11:09:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Thu, 15 Feb 2018 11:08:44 -0800 (PST) In-Reply-To: References: From: Alexei Khlebnikov Date: Thu, 15 Feb 2018 20:08:44 +0100 Message-ID: Subject: Re: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/alternative; boundary="001a1142e64c24d7eb056544f64b" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --001a1142e64c24d7eb056544f64b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Judging from the comment of the commit implementing the "--no-optional-locks" switch, https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee3 =E2=80=8B , 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". --001a1142e64c24d7eb056544f64b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Judging from the comment of the commit implementing the "--no-optional-locks" switch,

https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6d= d7ee3
=E2=80=8B
, the switch was implemented exactly for backgrou= nd refresh in "tools like IDEs or fancy editors".
I.e. for mit= igating this particular bug! Now we only have to use this switch in our &qu= ot;fancy editor".

--001a1142e64c24d7eb056544f64b-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 17:33:15 2018 Received: (at 21559) by debbugs.gnu.org; 15 Feb 2018 22:33:15 +0000 Received: from localhost ([127.0.0.1]:45294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emS5b-00034o-4T for submit@debbugs.gnu.org; Thu, 15 Feb 2018 17:33:15 -0500 Received: from mail-wr0-f176.google.com ([209.85.128.176]:36097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emS5X-00034O-TV for 21559@debbugs.gnu.org; Thu, 15 Feb 2018 17:33:12 -0500 Received: by mail-wr0-f176.google.com with SMTP id u15so1228773wrg.3 for <21559@debbugs.gnu.org>; Thu, 15 Feb 2018 14:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=126rKnjF9Tm6UW00OYHeTQVA98XWCgcTlsaAKVBSKSE=; b=Q+hYrGFZRTp7WETE8wzqpZXaCWpb1QgL0eXoDaiorwwFNmt6DyofTjnUdlMUgB8El9 T6aFmAxE1QGDDumpH9mlQsDSnoD+PXecYWK+CJ5d4qTmNFpRslHrnwcu5DlmODqDo64t nrkrRpb38ergl11f+fu/Pa3mhgi/Cs0/slBswUlpgeJB7Pg0dEAQMokaAAtmaRIbCHFD ahfDbG7emc+ph/U6Hw4JQc9zkUsqcZHIiKuAzgLkq4rz5ouED0h+Fa8pYnw8XjKpKYfW UqQl+4OXLUKARkMdODDT1S/b0UN58eH6VC+CVPlxtaxVqNzVeyoVgH2zhxYt5Hr0JdMI YhQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=126rKnjF9Tm6UW00OYHeTQVA98XWCgcTlsaAKVBSKSE=; b=PBpdsp/eRwiGW1PooheLedhO+f22fEGRskagr1tScz//8ciCHd28gO4VmzW+QLTrr8 9GLoKOST/kPejLG+ZlR6BkLedJA7vSxzG0mQ6bM5TugiOK/daXuJUjAL14Ag+2baELAP ajLpg6BqAtEjAGw6pxxtcH/4Aeu7GEj5F2S3TF0KPDkwM5F3sQbLNxJli/7e+clFK7JG x3z9WyDqRdATycYkrDhGlZs+XYUQRTmFA7qDsakQKW+yb+SXbV/mWQ2iOuo4tvV7Pob3 G/oPOnC5FGNQR2hBwsUCDNHne3Ko36KOE42khDvPmJk2uJzs9G66ZVMCuoY8pO8FiXmb sTtg== X-Gm-Message-State: APf1xPCPHKEBf5qw5zRTPlt9fy6VcbvnUg8mfIAFuRDxQzjl1+C6rLha glH4/TUnorOSUnr5/MjE1x1fqM3M8xeHRqgPSSJyUA== X-Google-Smtp-Source: AH8x225MNArlDLf1pyfuPdytGHaRK4hQBZcfuguURBAQsvqMuF10VlOEA+c4BnFWSHKdcMt0fUZompS0B1AF9heyUIg= X-Received: by 10.223.175.50 with SMTP id z47mr3640673wrc.198.1518733985807; Thu, 15 Feb 2018 14:33:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Thu, 15 Feb 2018 14:32:44 -0800 (PST) In-Reply-To: References: From: Alexei Khlebnikov Date: Thu, 15 Feb 2018 23:32:44 +0100 Message-ID: Subject: Re: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/mixed; boundary="f403045f4deebbe8fa056547cfb3" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --f403045f4deebbe8fa056547cfb3 Content-Type: multipart/alternative; boundary="f403045f4deebbe8f6056547cfb1" --f403045f4deebbe8f6056547cfb1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am sending patch that fixes the issue. It fixes the issue for me on Emacs' current master branch. The patch also cleanly applies to emacs-26 branch. I tested using Mitchel Humpherys' repro method, i.e. $ cd /path/to/emacs $ ./src/emacs -Q lisp/*.el [ M-x global-auto-revert-mode ] $ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" >> $f; done; git commit -am "test $i"; done Without the fix I could reproduce the issue, and with the fix I could not reproduce even if running the loop 100 times instead of 30. Emacs was reloading a lot of files very fast, but no locking errors happened in the shell which ran the loop. 2018-02-15 20:08 GMT+01:00 Alexei Khlebnikov : > Judging from the comment of the commit implementing the > "--no-optional-locks" switch, > > https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee= 3 > =E2=80=8B > , the switch was implemented exactly for background refresh in "tools lik= e > IDEs or fancy editors". > I.e. for mitigating this particular bug! Now we only have to use this > switch in our "fancy editor". > > --f403045f4deebbe8f6056547cfb1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am sending patch that fixes the issue. It fixes the= issue for me on Emacs' current master branch. The patch also cleanly a= pplies to emacs-26 branch.

I tested using Mitchel Humpherys= 9; repro method, i.e.

    $ cd /path/to=
/emacs
    $ ./src/emacs -Q lisp/*.el
    [ M-x global-auto-revert-mode ]
    $ for i in $(seq 30); do for f in lisp/*.el; do echo "; $i" &=
gt;> $f; done; git commit -am "test $i"; done

Without the fix I could reproduce the issue, and with the fix I c= ould not reproduce even if running the loop 100 times instead of 30. Emacs = was reloading a lot of files very fast, but no locking errors happened in t= he shell which ran the loop.


2018-02-15 20:08 GMT+01:00 Alexei Khleb= nikov <alexei.khlebnikov@gmail.com>:
Judging from the comment of the commi= t implementing the "--no-optional-locks" = switch,

https://github.com/git/git/commit/27344d6a6c8056664966e11acf674e5da6dd7ee3
=E2=80= =8B
, the switch was implemented exactly for background refresh in "= ;tools like IDEs or fancy editors".
I.e. for mitigating this partic= ular bug! Now we only have to use this switch in our "fancy editor&quo= t;.


--f403045f4deebbe8f6056547cfb1-- --f403045f4deebbe8fa056547cfb3 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebase-B.patch" Content-Disposition: attachment; filename="0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebase-B.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jdp2dexn0 RnJvbSA0YmJhNTFkZWQ0Mjk1NGE2MmM5OTY5NjQ1M2MxN2U3ZmEzZjJiNzMwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4ZWkgS2hsZWJuaWtvdiA8YWxleGVpLmtobGVibmlrb3ZA Z21haWwuY29tPgpEYXRlOiBUaHUsIDE1IEZlYiAyMDE4IDIxOjE4OjAxICswMTAwClN1YmplY3Q6 IFtQQVRDSF0gRml4IGZvcjogIjI1LjAuNTA7IGF1dG8tcmV2ZXJ0LW1vZGUgYnJlYWtzIGdpdCBy ZWJhc2UiCiAoQnVnIzIxNTU5KQoKKiBsaXNwL3ZjL3ZjLWdpdC5lbCAodmMtZ2l0LXN0YXRlLCB2 Yy1naXQtY29uZmxpY3RlZC1maWxlcykKICBVc2UgIi0tbm8tb3B0aW9uYWwtbG9ja3MiIHN3aXRj aCB3aGVuIGRvaW5nICJnaXQgc3RhdHVzIi4KLS0tCiBsaXNwL3ZjL3ZjLWdpdC5lbCB8IDE1ICsr KysrKysrKysrLS0tLQogMSBmaWxlIGNoYW5nZWQsIDExIGluc2VydGlvbnMoKyksIDQgZGVsZXRp b25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC92Yy92Yy1naXQuZWwgYi9saXNwL3ZjL3ZjLWdpdC5l bAppbmRleCA0NzE3MmRkNTJmLi4wNmRiNDNjMzExIDEwMDY0NAotLS0gYS9saXNwL3ZjL3ZjLWdp dC5lbAorKysgYi9saXNwL3ZjL3ZjLWdpdC5lbApAQCAtMjkyLDEzICsyOTIsMTYgQEAgdmMtZ2l0 LXN0YXRlCiAgIDs7IHVwc3RyZWFtLiAgV2UnZCBuZWVkIHRvIGNoZWNrIGFnYWluc3QgdGhlIHVw c3RyZWFtIHRyYWNraW5nCiAgIDs7IGJyYW5jaCBmb3IgdGhhdCAoYW4gZXh0cmEgcHJvY2VzcyBj YWxsIG9yIHR3bykuCiAgIChsZXQqICgoYXJncwotICAgICAgICAgIGAoInN0YXR1cyIgIi0tcG9y Y2VsYWluIiAiLXoiCisgICAgICAgICAgYCg7OyBBdm9pZCBsb2NraW5nIHJlcG9zaXRvcnkgZHVy aW5nICJnaXQgc3RhdHVzIiAoYnVnIzIxNTU5KS4KKyAgICAgICAgICAgICxAKHdoZW4gKHZlcnNp b248PSAiMi4xNS4wIiAodmMtZ2l0LS1wcm9ncmFtLXZlcnNpb24pKQorICAgICAgICAgICAgICAg ICcoIi0tbm8tb3B0aW9uYWwtbG9ja3MiKSkKKyAgICAgICAgICAgICJzdGF0dXMiICItLXBvcmNl bGFpbiIgIi16IgogICAgICAgICAgICAgOzsgSnVzdCB0byBiZSBleHBsaWNpdCwgaXQncyB0aGUg ZGVmYXVsdCBhbnl3YXkuCiAgICAgICAgICAgICAiLS11bnRyYWNrZWQtZmlsZXMiCiAgICAgICAg ICAgICAsQCh3aGVuICh2ZXJzaW9uPD0gIjEuNy42LjMiICh2Yy1naXQtLXByb2dyYW0tdmVyc2lv bikpCiAgICAgICAgICAgICAgICAgJygiLS1pZ25vcmVkIikpCiAgICAgICAgICAgICAiLS0iKSkK LSAgICAgICAgKHN0YXR1cyAoYXBwbHkgIyd2Yy1naXQtLXJ1bi1jb21tYW5kLXN0cmluZyBmaWxl IGFyZ3MpKSkKKyAgICAgICAgIChzdGF0dXMgKGFwcGx5ICMndmMtZ2l0LS1ydW4tY29tbWFuZC1z dHJpbmcgZmlsZSBhcmdzKSkpCiAgICAgOzsgQWx0ZXJuYXRpdmVseSwgdGhlIGBpZ25vcmVkJyBz dGF0ZSBjb3VsZCBiZSBkZXRlY3RlZCB3aXRoICdnaXQKICAgICA7OyBscy1maWxlcyAtaSAtbyAt LWV4Y2x1ZGUtc3RhbmRhcmQnLCBidXQgdGhhdCdzIGFuIGV4dHJhIHByb2Nlc3MKICAgICA7OyBj YWxsLCBhbmQgdGhlIGBpZ25vcmVkJyBzdGF0ZSBpcyByYXJlbHkgbmVlZGVkLgpAQCAtOTM5LDgg Kzk0MiwxMiBAQCB2Yy1naXQtbWVyZ2UtYnJhbmNoCiAKIChkZWZ1biB2Yy1naXQtY29uZmxpY3Rl ZC1maWxlcyAoZGlyZWN0b3J5KQogICAiUmV0dXJuIHRoZSBsaXN0IG9mIGZpbGVzIHdpdGggY29u ZmxpY3RzIGluIERJUkVDVE9SWS4iCi0gIChsZXQqICgoc3RhdHVzCi0gICAgICAgICAgKHZjLWdp dC0tcnVuLWNvbW1hbmQtc3RyaW5nIGRpcmVjdG9yeSAic3RhdHVzIiAiLS1wb3JjZWxhaW4iICIt LSIpKQorICAobGV0KiAoKGFyZ3MKKyAgICAgICAgICBgKDs7IEF2b2lkIGxvY2tpbmcgcmVwb3Np dG9yeSBkdXJpbmcgImdpdCBzdGF0dXMiIChidWcjMjE1NTkpLgorICAgICAgICAgICAgLEAod2hl biAodmVyc2lvbjw9ICIyLjE1LjAiICh2Yy1naXQtLXByb2dyYW0tdmVyc2lvbikpCisgICAgICAg ICAgICAgICAgJygiLS1uby1vcHRpb25hbC1sb2NrcyIpKQorICAgICAgICAgICAgInN0YXR1cyIg Ii0tcG9yY2VsYWluIiAiLS0iKSkKKyAgICAgICAgIChzdGF0dXMgKGFwcGx5ICMndmMtZ2l0LS1y dW4tY29tbWFuZC1zdHJpbmcgZGlyZWN0b3J5IGFyZ3MpKQogICAgICAgICAgKGxpbmVzICh3aGVu IHN0YXR1cyAoc3BsaXQtc3RyaW5nIHN0YXR1cyAiXG4iICdvbWl0LW51bGxzKSkpCiAgICAgICAg ICBmaWxlcykKICAgICA7OyBUT0RPOiBMb29rIGludG8gcmVpbXBsZW1lbnRpbmcgYHZjLWdpdC1z dGF0ZScsIGFzIHdlbGwgYXMKLS0gCjIuMTUuMQoK --f403045f4deebbe8fa056547cfb3-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 05:25:26 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 10:25:26 +0000 Received: from localhost ([127.0.0.1]:50624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enidS-00015q-7f for submit@debbugs.gnu.org; Mon, 19 Feb 2018 05:25:26 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:39317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enidQ-00015b-F8 for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 05:25:24 -0500 Received: by mail-wm0-f48.google.com with SMTP id 191so7054583wmm.4 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 02:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ms/n1hyk9zI8Pcj0OY24sgsvMUaPQ32L5ZavV0n06CA=; b=tFz0ws9dVnMJoXlcEsxXo9X08uy8EVT9cJnjvdQIVzmuWWO53qj0/8mNlI091IY0Ai +uR4qdOQASMY6+jhAHJC6eQZVWwJzzrmS80NM861VjwmJP0bTUgY4S6/IxfLq4cybBX3 bcTTguPera7Zo3X9Yg60U3io1hbWE9MR9LuRE6FsB+g56Hua0IIljmmoB3D9wfEB8qIP ym+QK2gQMxpZfN105kOPhvF2/mUo2gRJWfMLUtfFWU5wiD4OHxwLV6bZYRCSyRHqJOdT oBlI/NRukXAwsRl5b+K1vzC1ruCsxmaQR7UdJTE+eTud+0KLXQzZ7RdBCDOq40acu+Kv Ap2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ms/n1hyk9zI8Pcj0OY24sgsvMUaPQ32L5ZavV0n06CA=; b=WjG+8PUy+7/ZcimKTg8QPc1FUihLHbTATpdKN36qg9DCXswgvrY435W9YbOvnH9nMN on5fwfI2Qn+Jc44pCPCU+xSSN7RFDkBZ0PUj8aLHVqtq56f5ynMyDOA5MlvYafrttnzt +MIReNOVR0BDTOLbY0sI2iMY20AUa870n3nx3suzN3kDZO0BrhZQGV6409KrSoAly6uv qCIFNdIoz+I33dfOnbHlQR4YIziyRYm9TRKDyPtSV7jXj+8XpGGMxm8vRb6vECu65F9D ooZHboby6/vOZCIMc/OQ09r1udjYIgZWZtyXnmC9SJGoPefzzPlWZAv2niVdcidyFYeB 5IxQ== X-Gm-Message-State: APf1xPCoOnAEwJLKrGqGk3ZxZ4HBfmBMdBSORlivtM4LCBXs8oCd2Qvo HmTUMukHXqkZmx4UPD2efxxJHxN7rXQINl+HnUv7Vw== X-Google-Smtp-Source: AH8x225SxXXtCaKb0msAfnqy0R4sA2yRqTOX4iJ0KDAhCz37Yntm2sPzwyXNBKe+iVr7HnIXGpqLNA21QxO+Heyv7Q0= X-Received: by 10.28.50.199 with SMTP id y190mr9508752wmy.161.1519035918607; Mon, 19 Feb 2018 02:25:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Mon, 19 Feb 2018 02:24:57 -0800 (PST) From: Alexei Khlebnikov Date: Mon, 19 Feb 2018 11:24:57 +0100 Message-ID: Subject: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) To: 21559@debbugs.gnu.org, Dmitry Gutov , Eli Zaretskii , Michael Albinus Content-Type: multipart/alternative; boundary="001a1147da0c546bfa05658e1c6e" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --001a1147da0c546bfa05658e1c6e Content-Type: text/plain; charset="UTF-8" Hi All, How can I get my patch reviewed? The patch is sent in the previous message, several days ago: https://debbugs.gnu.org/cgi/bugreport.cgi?msg=83;bug=21559;att=2;filename=0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebase-B.patch The same patch on GitHub: https://github.com/alexeikh/emacs/commit/4bba51ded42954a62c99696453c17e7fa3f2b730 Adding to the discussion: * Dmitry Gutov, because he is the maintainer for lisp/vc/* . * Eli Zaretskii and Michael Albinus, because they participated in the discussion on this bug before. --001a1147da0c546bfa05658e1c6e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Adding to the discussion:<= br>
* Dmitry Gutov, because he is the maintainer for lisp/vc/* .
* = Eli Zaretskii and Michael Albinus, because they participated in the discuss= ion on this bug before.

--001a1147da0c546bfa05658e1c6e-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 07:39:39 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 12:39:39 +0000 Received: from localhost ([127.0.0.1]:50647 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enkjJ-0006Ka-KS for submit@debbugs.gnu.org; Mon, 19 Feb 2018 07:39:39 -0500 Received: from mout.gmx.net ([212.227.15.19]:50665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enkjH-0006KI-1W for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 07:39:36 -0500 Received: from detlef.gmx.de ([212.91.243.206]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LeMij-1eQqWT12Nh-00qF4j; Mon, 19 Feb 2018 13:39:28 +0100 From: Michael Albinus To: Alexei Khlebnikov Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) References: Date: Mon, 19 Feb 2018 13:39:27 +0100 In-Reply-To: (Alexei Khlebnikov's message of "Mon, 19 Feb 2018 11:24:57 +0100") Message-ID: <87bmglkvb4.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:FJPhNwtJA4T+6BGqPjalcR+rEJ/cFusW+Mzk8igR4a9iT5dOAzp Kvp4rSOinvd6JGychv0R6y+v8++AD8JCPDZfnRHvbjG4nBHI8BXYLSVkdAkI93LHLrKDVOA WclgkeBjYiPNmmt2WOsjmF27x4UqLIahklNDpVVbLOw8TQd/AnauOaz3EL/Y2BLjyAnbi9K bi6aH6q4U9Uloy1k2DdIg== X-UI-Out-Filterresults: notjunk:1;V01:K0:gEkWDW2vrCg=:uhvevO4gI9kft4+XU7mPcE kA76ysgGVGKpWhmRYnQiG8hIQR8xqTykMcEcO61H5VPY0V1mgfMpINtgvrXRm48Z7Eic4ajFn IBnx27pxQ0d7x1Eh7wRtivNLsYl16ROcGOCU/gpRYqYDuM7W4mOT74Lqe7LHwCgpGRwT6u4SW HWbvvPUHzxf/DT6M8SUk1aJDai56g9sAX3xARD2Pnc7t1KD2drJZCWTueGgbH5Rj1XK7d9TGh 9sYGsSzrOfSF8Z/PHBJsdavKQ+aOo4hEnD4jcODX3VEimxF0fDfJZplGKa3CbZpXQgHHc8ZFJ UCsTx85JrBjjO5w3i/O4XNJK0O294UHXRw0t5S9Gs8ijnSJT+zjxovSfNKPiuW1ZUfiAQvciY EVWLU5wa4HWO+zx727/yqnLu+PXGfICKFpxFAXr3tDpj67mDKZwoUszPbj05Ls2YtcnzNFvyf Ydpl5ixblHSBjV7rZXwW6FzU/OIYMeUOb1UlPv+6Wzy18/WlX73qxm1JsltENlEAT2PNh91Bv jtw9bwhi0BIQW7Nyi19Q4pYR6XU96XviqWhtyDM7vjfzL7LTQwYfTQ2rNWQLYHvjt0Vo4tfr8 MscIrybF65Z7g3sFG5edMKyakq2ItV39J9JOD9lWaHTf6XE/U4Xvby4fngcojepb/LlLYuoaV eDP/YbtEZm6V8FKy9OaTcGxKEn64mADPzobrXIJ7J7WY1ft9QwrwtJj/pNi4Y4YZmGlFH6lJP hUuBw/dLmtTa43AQ7XfL8QLKqz5JOpF1CKQhUynXOdARt8d4phn6m/1ZewETTAEnjp7hiMJGv 5kyzcoYfeB5GowJyR7vgl+ah24hE+X79V2aqcnbLvMuVXX5C8I= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Eli Zaretskii , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alexei Khlebnikov writes: > Hi All, Hi Alexei, > https://debbugs.gnu.org/cgi/bugreport.cgi?msg=83;bug=21559;att=2;filename=0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebase-B.patch I don't know git in detail, so I don't know whether this argument is useful. However, I don't believe this argument shall be added, depending on git version number. A better approach would be to prepend "GIT_OPTIONAL_LOCKS=0" in `process-environment'. This would work for any git version, w/o further check. For git version <= 2.15.0, it would simply do nothing. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 10:29:53 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 15:29:53 +0000 Received: from localhost ([127.0.0.1]:51449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ennO5-00026f-1o for submit@debbugs.gnu.org; Mon, 19 Feb 2018 10:29:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ennO2-00026S-Ew for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 10:29:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ennNu-0005jW-0o for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 10:29:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ennNj-0005a8-QN; Mon, 19 Feb 2018 10:29:31 -0500 Received: from [176.228.60.248] (port=2350 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ennNj-0005oh-7z; Mon, 19 Feb 2018 10:29:31 -0500 Date: Mon, 19 Feb 2018 17:29:39 +0200 Message-Id: <83bmgl9evw.fsf@gnu.org> From: Eli Zaretskii To: Alexei Khlebnikov In-reply-to: (message from Alexei Khlebnikov on Mon, 19 Feb 2018 11:24:57 +0100) Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, michael.albinus@gmx.de, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Alexei Khlebnikov > Date: Mon, 19 Feb 2018 11:24:57 +0100 > > How can I get my patch reviewed? I already reviewed it. I was waiting for a few days to give others a chance to comment. > Adding to the discussion: > * Dmitry Gutov, because he is the maintainer for lisp/vc/* . > * Eli Zaretskii and Michael Albinus, because they participated in the discussion on this bug before. Thanks, but there's no need to add me: I read all the messages sent to the bug list. I think Michael's suggestion makes a lot of sense, btw. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 13:40:22 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 18:40:22 +0000 Received: from localhost ([127.0.0.1]:51617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqMP-00072T-IP for submit@debbugs.gnu.org; Mon, 19 Feb 2018 13:40:22 -0500 Received: from mail-wr0-f169.google.com ([209.85.128.169]:42164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqMO-00072G-0a for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 13:40:20 -0500 Received: by mail-wr0-f169.google.com with SMTP id k9so10643821wre.9 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 10:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ztdWV9hp5WlTMsHWXBEX/4zHQpcXqpptCKcqf5bFbjg=; b=hjY9uUEbl1etQO8tSFShGH4jILRH8y0fO73HT+TnUPBNv5yJoPWIqByfq0GsAj1g6A hf6C7yC2hprlJEoGGgxmJwuhPGwYY4PcQTi9RkfTvcBMqak2gkT3f38pNuB2NilDsAyd CCnvg96arAHztz6OoIc6V8CHerT+1M8yel/vyOyVEfRuCY8qC85CGmgwpsFhoM7fUMY7 CiRpyT5/mZauwqaBdJYaF2P5I2voFuzxnsJYCQajFNUPNTABlIkGRVhlXJSHceMxILLn 6+u2ncL5EQf0Nf6XBPF0sBrFwg21ahigBhXKqaAIj9YJqfOK0Jdq6yUg8oBtlsyvWocG Jdqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ztdWV9hp5WlTMsHWXBEX/4zHQpcXqpptCKcqf5bFbjg=; b=sDxYp9YJD/10hKjVVOB+08JCQGFT6IEhrBySR6KhGG0uu5yaZgAKlFsUFx4rg7j8uS xxcYbW6bKta1P3oOo/hemQThYYXoIRPvVFuBFHDXRRzWazsR+7ROTilEVanIqbUvVX8p ExRoKS448fe2Mv2vNypTe2ShRMllVFxnhIj1ZY6Y/tL2pRlsWEP2wv6/idnTSzX1qJQP Y7dwRsoZIIj3LN+PtODXiW4dn8LZfq8pyhC5l4JWJojM3ooiiXG2zqmBKmq6/QJ0XfS+ nF9YIblaslENK6+yK5nYIjaQ4jZERWijhdET42eAYZ5WyyJv7h58Dnfiwqdc7oohMvwY f4OA== X-Gm-Message-State: APf1xPB45lUbwAY9Eq+9dUm5cK0HDpPUjZCMbsfNhQQZMwylhHF79nUF h5KdTPI5DcaFOQM5jo6qsNzTmcYAGKG6yqyEHoZDAA== X-Google-Smtp-Source: AH8x227xwl/KcIyNhkDAv59vBpNZxekvSmdjI1ZR5LLvoeEphszSvftRIg1MTnkY51ji8xpwoZxa8bD9/NOPsxtraRM= X-Received: by 10.223.151.129 with SMTP id s1mr14468682wrb.206.1519065613907; Mon, 19 Feb 2018 10:40:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Mon, 19 Feb 2018 10:39:53 -0800 (PST) In-Reply-To: <83bmgl9evw.fsf@gnu.org> References: <83bmgl9evw.fsf@gnu.org> From: Alexei Khlebnikov Date: Mon, 19 Feb 2018 19:39:53 +0100 Message-ID: Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) To: 21559@debbugs.gnu.org Content-Type: multipart/mixed; boundary="94eb2c1b656c4ed4060565950633" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: Michael Albinus , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --94eb2c1b656c4ed4060565950633 Content-Type: text/plain; charset="UTF-8" Eli, Michael, thanks for the review. > A better approach would be to prepend "GIT_OPTIONAL_LOCKS=0" in `process-environment'. Thanks for the suggestion, I am attaching version 2 of the patch which implements this suggestion. > > Adding to the discussion: > > * Dmitry Gutov, because he is the maintainer for lisp/vc/* . > > * Eli Zaretskii and Michael Albinus, because they participated in the discussion on this bug before. > > Thanks, but there's no need to add me: I read all the messages sent to > the bug list. OK, I've removed you from the addressees. I'm not sure if I should do the same for others, so I left Dmitry and Michael in CC. --94eb2c1b656c4ed4060565950633 Content-Type: text/x-patch; charset="US-ASCII"; name="v2-0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebas.patch" Content-Disposition: attachment; filename="v2-0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebas.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jdujwg8b0 RnJvbSA1MjY1ZDA0ZjkwOGNkY2FiMTJiMjQ0MDIyMjFiMThkODNmYWIxZjQzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4ZWkgS2hsZWJuaWtvdiA8YWxleGVpLmtobGVibmlrb3ZA Z21haWwuY29tPgpEYXRlOiBNb24sIDE5IEZlYiAyMDE4IDE5OjA3OjU4ICswMTAwClN1YmplY3Q6 IFtQQVRDSCB2Ml0gRml4IGZvcjogIjI1LjAuNTA7IGF1dG8tcmV2ZXJ0LW1vZGUgYnJlYWtzIGdp dCByZWJhc2UiCiAoQnVnIzIxNTU5KQoKKiBsaXNwL3ZjL3ZjLWdpdC5lbCAodmMtZ2l0LXN0YXRl LCB2Yy1naXQtY29uZmxpY3RlZC1maWxlcyk6CiAgUHJlcGVuZCAiR0lUX09QVElPTkFMX0xPQ0tT PTAiIHRvIHByb2Nlc3MtZW52aXJvbm1lbnQKICB3aGVuIGRvaW5nICJnaXQgc3RhdHVzIi4KLS0t CiBsaXNwL3ZjL3ZjLWdpdC5lbCB8IDEyICsrKysrKysrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDkg aW5zZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL3ZjL3ZjLWdp dC5lbCBiL2xpc3AvdmMvdmMtZ2l0LmVsCmluZGV4IDQ3MTcyZGQ1MmYuLjM1Y2I3ZGVmY2EgMTAw NjQ0Ci0tLSBhL2xpc3AvdmMvdmMtZ2l0LmVsCisrKyBiL2xpc3AvdmMvdmMtZ2l0LmVsCkBAIC0y OTEsMTQgKzI5MSwxNyBAQCB2Yy1naXQtc3RhdGUKICAgOzsgY29ycmVzcG9uZGluZyB1cHN0cmVh bSBicmFuY2gsIGFuZCB0aGUgZmlsZSB3YXMgbW9kaWZpZWQKICAgOzsgdXBzdHJlYW0uICBXZSdk IG5lZWQgdG8gY2hlY2sgYWdhaW5zdCB0aGUgdXBzdHJlYW0gdHJhY2tpbmcKICAgOzsgYnJhbmNo IGZvciB0aGF0IChhbiBleHRyYSBwcm9jZXNzIGNhbGwgb3IgdHdvKS4KLSAgKGxldCogKChhcmdz CisgIChsZXQqICg7OyBBdm9pZCByZXBvc2l0b3J5IGxvY2tpbmcgZHVyaW5nICJnaXQgc3RhdHVz IiAoYnVnIzIxNTU5KS4KKyAgICAgICAgIChwcm9jZXNzLWVudmlyb25tZW50CisgICAgICAgICAg KGNvbnMgIkdJVF9PUFRJT05BTF9MT0NLUz0wIiBwcm9jZXNzLWVudmlyb25tZW50KSkKKyAgICAg ICAgIChhcmdzCiAgICAgICAgICAgYCgic3RhdHVzIiAiLS1wb3JjZWxhaW4iICIteiIKICAgICAg ICAgICAgIDs7IEp1c3QgdG8gYmUgZXhwbGljaXQsIGl0J3MgdGhlIGRlZmF1bHQgYW55d2F5Lgog ICAgICAgICAgICAgIi0tdW50cmFja2VkLWZpbGVzIgogICAgICAgICAgICAgLEAod2hlbiAodmVy c2lvbjw9ICIxLjcuNi4zIiAodmMtZ2l0LS1wcm9ncmFtLXZlcnNpb24pKQogICAgICAgICAgICAg ICAgICcoIi0taWdub3JlZCIpKQogICAgICAgICAgICAgIi0tIikpCi0gICAgICAgIChzdGF0dXMg KGFwcGx5ICMndmMtZ2l0LS1ydW4tY29tbWFuZC1zdHJpbmcgZmlsZSBhcmdzKSkpCisgICAgICAg ICAoc3RhdHVzIChhcHBseSAjJ3ZjLWdpdC0tcnVuLWNvbW1hbmQtc3RyaW5nIGZpbGUgYXJncykp KQogICAgIDs7IEFsdGVybmF0aXZlbHksIHRoZSBgaWdub3JlZCcgc3RhdGUgY291bGQgYmUgZGV0 ZWN0ZWQgd2l0aCAnZ2l0CiAgICAgOzsgbHMtZmlsZXMgLWkgLW8gLS1leGNsdWRlLXN0YW5kYXJk JywgYnV0IHRoYXQncyBhbiBleHRyYSBwcm9jZXNzCiAgICAgOzsgY2FsbCwgYW5kIHRoZSBgaWdu b3JlZCcgc3RhdGUgaXMgcmFyZWx5IG5lZWRlZC4KQEAgLTkzOSw3ICs5NDIsMTAgQEAgdmMtZ2l0 LW1lcmdlLWJyYW5jaAogCiAoZGVmdW4gdmMtZ2l0LWNvbmZsaWN0ZWQtZmlsZXMgKGRpcmVjdG9y eSkKICAgIlJldHVybiB0aGUgbGlzdCBvZiBmaWxlcyB3aXRoIGNvbmZsaWN0cyBpbiBESVJFQ1RP UlkuIgotICAobGV0KiAoKHN0YXR1cworICAobGV0KiAoOzsgQXZvaWQgcmVwb3NpdG9yeSBsb2Nr aW5nIGR1cmluZyAiZ2l0IHN0YXR1cyIgKGJ1ZyMyMTU1OSkuCisgICAgICAgICAocHJvY2Vzcy1l bnZpcm9ubWVudAorICAgICAgICAgIChjb25zICJHSVRfT1BUSU9OQUxfTE9DS1M9MCIgcHJvY2Vz cy1lbnZpcm9ubWVudCkpCisgICAgICAgICAoc3RhdHVzCiAgICAgICAgICAgKHZjLWdpdC0tcnVu LWNvbW1hbmQtc3RyaW5nIGRpcmVjdG9yeSAic3RhdHVzIiAiLS1wb3JjZWxhaW4iICItLSIpKQog ICAgICAgICAgKGxpbmVzICh3aGVuIHN0YXR1cyAoc3BsaXQtc3RyaW5nIHN0YXR1cyAiXG4iICdv bWl0LW51bGxzKSkpCiAgICAgICAgICBmaWxlcykKLS0gCjIuMTUuMQoK --94eb2c1b656c4ed4060565950633-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 13:50:12 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 18:50:12 +0000 Received: from localhost ([127.0.0.1]:51631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqVv-0007IN-T7 for submit@debbugs.gnu.org; Mon, 19 Feb 2018 13:50:12 -0500 Received: from mout.gmx.net ([212.227.17.22]:43197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqVu-0007IA-7N for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 13:50:10 -0500 Received: from detlef.gmx.de ([212.91.243.206]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6eTo-1ebvpP2fsi-00wXrI; Mon, 19 Feb 2018 19:50:03 +0100 From: Michael Albinus To: Alexei Khlebnikov Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) References: <83bmgl9evw.fsf@gnu.org> Date: Mon, 19 Feb 2018 19:50:02 +0100 In-Reply-To: (Alexei Khlebnikov's message of "Mon, 19 Feb 2018 19:39:53 +0100") Message-ID: <87h8qc95lx.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:WmFsAaa+aku3sDpxwhPAOaklrjh3cbVaOkpe3LuhN0COhhfhu8v EKE5W89rEPZg9PwcvX8X4hsyxFMVaY5Xszl0lRiyqUgHoi29/HP1A8ONUEsqTTngtNWR44b y344eUJbHQcjpNBuExg8DmEmw1vWzUo+4uS0fLSP0WBZyFCT8w+FNZSZMxg+74fnShPovB0 EDq8WdnS9MBYtJWvKtXTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:sM+oWA3/FxE=:SmY5HvjYHlS7iAsmtl6jrA 9o96FNCvIvN7nt3U4vkSwrnJkq4coYdTwz4J6wJzs5ILsotG/38K0zeepoTezQLRDrml9m903 mxPwn61rzSh+Br9txW73+3Y07Dyq3bjQMmrSQyUXCpa7zfILhjDkwNLEUwl9ju27stZ6rqS5V q3TCPK1ygF9xOCAFhKB+wFD4H4ZvDX5D/pnaH6C68Ts+2Wa/SKsxs8LKPn38OvKiSIdGnqSaK K8/8mAuOWqoq002FtrQIj96+ClXdEv8Cqw+adkWmr3mQC44UQ3H5FxikUf3LxDbmQKoAAUeqE XxP5mtASuBssyLBawmfwZYBal+jBWyU8n0+zb8n/hXZKHyXYN+3TCioXWpJKY7hYwA1hyVNMX dFYbBCdXkyzrXV7USfWzLHSDUtSRX+0bJNGtKZK5VHvwjQRMrQfbgPfHUb8SZZVlV1Z5RZH+e 4mMuFL4tG6pQBY78cy38p6ZT3yUItFqh4AydhoDcguW0C+hGuIChhm8XnFqmb8TeQ7balzZMk UpG7ptsnwWMzUp2iFNwY9Dw6m+AiZBa08WbMevcY9K3ffsYdGWkDpEnTjOwo7mrUbeW9tRqOf aTZqtt3JLfTO6i6ssp40cHXuzGI6NBhcAtCYJX5gatAqYRWozcIuphfGyJa9BtdIUnpos2/HD I/Ok1y44CODFhjT1VMKgtO2dxq62OTiQwmwPfz3kIGZCNCV20Wgh9NIaDbTRqTv8kiwg5gYPh X6tx5z7VQTiE8Zn+nyBO0QEZaed9KA92hJiiirTC/u9ugVymb7OUOgMzmt+f+CpqE9OwIRFea DRA9sLa1xeb26yZ30KCn+UU1GJYrsj/5esv0D9GCf7TYDgojdE= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alexei Khlebnikov writes: > Eli, Michael, thanks for the review. Hi Alexei, >> A better approach would be to prepend "GIT_OPTIONAL_LOCKS=0" in >> `process-environment'. > > Thanks for the suggestion, I am attaching version 2 of the patch which > implements this suggestion. Looks OK to me. >> Thanks, but there's no need to add me: I read all the messages sent to >> the bug list. > > OK, I've removed you from the addressees. I'm not sure if I should do > the same for others, so I left Dmitry and Michael in CC. I don't care. I try to react on relevant messages in the respective mailing lists, but it could happen that I oversee something. Unlike Eli, I don't read *every* message. The subject must tell me that I shall do. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 14:06:02 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 19:06:03 +0000 Received: from localhost ([127.0.0.1]:51640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqlG-0007gL-PI for submit@debbugs.gnu.org; Mon, 19 Feb 2018 14:06:02 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enqlF-0007fs-7a for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 14:06:01 -0500 Received: by mail-wm0-f45.google.com with SMTP id z9so11687006wmb.3 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 11:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0hP3mNkkZz1hVCgtJSUL1kXA/ScICMCAHv4oc5YNRDM=; b=uk3ShOOFGMfabsvH9Zxpffz1qkWMBnwga4JVKeSHoOrht1lQnQ9+437N5PSjBFvcot 7ZESjTM5aKWBHcjBt+lLORKoF49EfgoUJptLGQLMgDIaasu64HZ0hd+kNmJwy/9kvkw0 y6rniS2xu+ID6DzV8bruc+RTYgb4INqRBK1Ly11wGSB/TTnJW7N3lcb6fa1F2GPnpj2k potLYqULSM3SqNJeKT/BrFh485v6KyLOtzEU4fkv13MswGI3g+osy5CShhqZzT6ldkQt OPQRyOklQAxaAqOj+04M7AKlnLqV323VQhBxgBxZsBHqmXrRRFpQUfGD3kN4qVrqYpUU 8icA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0hP3mNkkZz1hVCgtJSUL1kXA/ScICMCAHv4oc5YNRDM=; b=Or017geu5wJle3JFTOhlQiXJK10WIATdrGtpN/7spfcTDWBtrvnB00y9X5+T2cikcY fyUkOhKarSfzb2cBUbVZaWAYoB/EVeqXsS37JPLa8X6SA3zbGWknOyFoTIajkAXH7RA5 oHheEKgIwLCw4+ZvXJv0llk/iO/c9LtG7XFPK41QpZE4CvMz4ijFUIpF7441dGC3WkMm 2KJSQhHG9odik25DmadQYOtawkIWN/Oa7826vJtocgdmhNREXUazZWIL48G+zkMSl6Ov 4vi9DtSBPkHU1qRSFcEn+HETcNZmXSsZ3P7GgF2+NzT9hDI+nm0gAoWRW5l+nq0ORmjn 5jbQ== X-Gm-Message-State: APf1xPCp5ITGHLtIZpxNOzPIZWwLlECJ+BK4rA28UXpmIaI7yJ7fuk7a 6ML/7vi5YXVbpfYFnWUZ79dyHFjZRIBRP36ke6M= X-Google-Smtp-Source: AH8x226/QghE6ybELnnxFwDo31VvAE5+cWpvEzeBwTv1D4J4LaNcEBRhMUr1O0mEulwdBkTBQR12keD6s/52yhbINu8= X-Received: by 10.28.50.199 with SMTP id y190mr10722989wmy.161.1519067155558; Mon, 19 Feb 2018 11:05:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Mon, 19 Feb 2018 11:05:35 -0800 (PST) In-Reply-To: <87h8qc95lx.fsf@gmx.de> References: <83bmgl9evw.fsf@gnu.org> <87h8qc95lx.fsf@gmx.de> From: Alexei Khlebnikov Date: Mon, 19 Feb 2018 20:05:35 +0100 Message-ID: Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) To: Michael Albinus Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2018-02-19 19:50 GMT+01:00 Michael Albinus : > Looks OK to me. Cool, so quick answer, thanks! :) From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 18:35:12 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 23:35:12 +0000 Received: from localhost ([127.0.0.1]:51817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enuxk-0007uW-9W for submit@debbugs.gnu.org; Mon, 19 Feb 2018 18:35:12 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:36446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enuxi-0007uI-BE for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 18:35:10 -0500 Received: by mail-wm0-f42.google.com with SMTP id f3so18006837wmc.1 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 15:35:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=YyGozvJEEFpbr5z5YgQxvVuwkRVYgoQTebe3FhiTNf4=; b=KkkughEVAi9JbTjvF7rsUUDzu1X7g2ygWcIy3gZ+9DkAbHv7G2f+htUH94hshMAWvx wyqAWVLWVD1KdVS86wq21Fm800szi0irmJAjHAmBo2RuDe42fcaxoQ0pH3lML17jIiLr cI0hx9FMEeLT/3OnNaXukUM023COvCsFcq5tfjVT4pisSLuYTZunPPzP/tGBEZ4nNOgh sOvu+Z3EZLQyFbtxF8VA3C2D1gsodbccWAS9nBeGJYjhzMc97MRhJMrzsLiwPV1zHmyy XHjyWsMSKs8xmUnXUfqlgMj0mpStaKW4fnZQHGMugv1Q+aiZgGPJBlCEJZc8rsVkpsT2 eSbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=YyGozvJEEFpbr5z5YgQxvVuwkRVYgoQTebe3FhiTNf4=; b=DjYr0UvzAyTBAt3fNobxWdM8tHigWOo1AH14bmpzI8eqg76iFPO359eZ0Gp5cpKsNy hZKadlk/jO3rtW2oEtjASor1qddR4FR5Nz635Ii9vhrNIIPtwu4cYva3hUwd7oQI9+Og MxH0+H5qEMiJK3oSOQzx+IkOCBejy1exqA6xh0a3Q+bx1PfwWS/SetVGIhHbcygk/23X C3Cv1NsbAFPnZK3ru0emDzdvWyUfCqtXQGeMjSKkrbmWyRoRkJEPQH7qBNJHMQBbkwYz vCo+WRPsDy0kdAUDg7PYjPh+/D1sjGx/Qio6S5tFtVX2MXC/CZI/R7aEtwEULDBg4G7g pi0w== X-Gm-Message-State: APf1xPBaeXSAa5fMYm0nX3kIE8sU4BXU+Ve+EhCztxLhFX/csd31zZ1M Kbya72YGyztHjhf8v6PQtTISr8F0 X-Google-Smtp-Source: AH8x2263/9pY9mHVmmaXILKtcsc5vdVC+c8TsmUMVgIDgFX5Nh4U+XL/mnhibcxi8JewJe08G83BBA== X-Received: by 10.28.136.74 with SMTP id k71mr3565173wmd.11.1519083304205; Mon, 19 Feb 2018 15:35:04 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id y23sm12774389wra.9.2018.02.19.15.35.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 15:35:02 -0800 (PST) Subject: Re: PATCH review needed: lisp/vc/vc-git.el (vc-git-state, vc-git-conflicted-files) To: Michael Albinus , Alexei Khlebnikov References: <83bmgl9evw.fsf@gnu.org> <87h8qc95lx.fsf@gmx.de> From: Dmitry Gutov Message-ID: <96cf54db-8513-7139-da06-3e1b46412adb@yandex.ru> Date: Tue, 20 Feb 2018 01:35:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <87h8qc95lx.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2/19/18 8:50 PM, Michael Albinus wrote: > I try to react on relevant messages in the respective > mailing lists, but it could happen that I oversee something. Same here, except I slightly prefer to be in Cc. That makes the thread a bit easier to notice. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 18:42:06 2018 Received: (at 21559) by debbugs.gnu.org; 19 Feb 2018 23:42:06 +0000 Received: from localhost ([127.0.0.1]:51821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1env4Q-000847-01 for submit@debbugs.gnu.org; Mon, 19 Feb 2018 18:42:06 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:51215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1env4O-00083Z-75 for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 18:42:04 -0500 Received: by mail-wm0-f45.google.com with SMTP id h21so10702895wmd.1 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 15:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PloGhic8Zqf/R8ARviBJOmZGZfGkwkznRkKoRECcm/k=; b=doZUFYmi3S82GgcK0FcfBGMImY9c2XKR2wGvISqcoSqdg6x3rKNhW8eKEXaQwF8wtB qkpB8CQj5+8k+cdKRiONxXX2AMH/g5CEVDvSf1qEiSShlM078vvba82+V8DFgPR0DT3k /LWqJgoSEay43vHjIhAJpH6VGGvD9RCebSAPQFpuqMGMovNZrK6NwJPa0Pum1IB3oUzA gfGonACg4b9iQDQT+Q+1xoWwme3dDFoN/BgSdITiy9oe5w1xW1XzcjYv5TUe7wdOLySq HYycCEi3Tdbtu71Lo1Neqycxb4UGugdG2CG/q72HjmLe/FvXd9RMyAXXUtrqqzD5Ait6 4uiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PloGhic8Zqf/R8ARviBJOmZGZfGkwkznRkKoRECcm/k=; b=SD6pVEdNBNzCw1olaPhB68kl3ZnvIdpEzLPY3y/Qby0bJbQij2anNRv24FzFBpZJQk 7D880aOEMZvafDh7YH7mi8InfcQE7so1MHemdVzw4NPvllSWjDb6nBvAe25bWLUBYlX/ msvysd6Tx4yLDJMmNg0I2ms7FvKrvGPqx/Z086PKSLS7ixVMo7rUdiNsOKFWRgpOkq5U WuCQndElMpEv7VSDYNMrLiJW6tvWIZCVUv/SP/X/0KZBt5eRdDGiCsQ+beNR2r8r+JnA EEsPYckcqBwFkkzWm8p0/lv25glQg7Bx3Qv0Nj/5pzJSztl3CrYtFPB9ZijdHxgT6gpl XC9w== X-Gm-Message-State: APf1xPCb+YLnFAzEJcOJ0+Eo/PrxO0lDcwOTkNphnZl5UknlfFnx9zEY AiaYn3hyyjdDqDyn/Eup4JlxQKVx X-Google-Smtp-Source: AH8x224Ldl+kQlZ/MTNdJpmG1wloW3lMd8VM847csDRSYT5nR1DeyT57mZ56wJ6DDcD3d3AsgQNZWQ== X-Received: by 10.28.172.130 with SMTP id v124mr12290806wme.16.1519083718212; Mon, 19 Feb 2018 15:41:58 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id a14sm3494378wra.27.2018.02.19.15.41.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 15:41:57 -0800 (PST) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Alexei Khlebnikov , 21559@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> Date: Tue, 20 Feb 2018 01:41:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) 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)) From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 19:07:23 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 00:07:23 +0000 Received: from localhost ([127.0.0.1]:51829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1envSt-0000CS-BC for submit@debbugs.gnu.org; Mon, 19 Feb 2018 19:07:23 -0500 Received: from mail-wr0-f180.google.com ([209.85.128.180]:37752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1envSr-0000CC-21 for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 19:07:21 -0500 Received: by mail-wr0-f180.google.com with SMTP id z12so5192567wrg.4 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 16:07:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=32vaW3D6LfzinqNUW8Wg2NaeV4jVT3n0geRD4TT3S30=; b=eWH2KH4rteQVPxMP/0znGptxtWiewOLCrOOLhCXcmUDub7I6A+YNwOhobpeskczdYh M1uGRVcrNNvuTc2qAKe0jN/vcKjbSVOBBy8HLy33CRzFOlL98TMFtfRbWHJHawDqF67h 607aWcMMwtFxuDAR1vlHTaD2oML+zdtdt5tVIt0sOPgbXqNHQGhP3OTVQ+T35otiD8XH EzRAbx3Kcao57Ut3NyVIKitOIYPB/5Ma8aGquEnB9iW3/aQgT7raBfFa78G54NAzcU4r jQHpU06O+XBZbQGFHYYRJ2/NjjiTn9k2S9pHKlZ94j1he2W01umy2JCncVkEXXc5GFat zvhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=32vaW3D6LfzinqNUW8Wg2NaeV4jVT3n0geRD4TT3S30=; b=meUBkuphJIsCqqZAXEeE1fNlXwmaH7zSZeNzSDhbuhT8KlYFG+0dawISmhO1m5Zw5V FhxetE1DeZ7CmSX37OzVfNkKO9TWMl03koc/vh+UYu6I8NK5Wea0UG3rkiik7mmny5EL TwUmoLdgMvWgd/63PKF24RBtf0XTpPl+OuJrqLAyEC46rMa7c5WDXIUQXb+lnA7R/6Tx hgTvRLQirO/803pL1E70vx0YJoRF5HDg5CtUOoiUspd4ZK37ZZi7bckbFmHBLxnx6HDm oF4N/GRJ002cDwTvA3P1rQwxyDXNbUZYTabC9pEb2jCZnYYipKhLdsmXvWo7YxFUTblR mTRA== X-Gm-Message-State: APf1xPB6RFaTPgqHAcF95N6AaO7JPLQTDCdzdfsqr0VZdFsHIpnqxY9t oW7Vf5Fbkh0t2QKPLZoeg3FDkvqML95qXzGaw+2rtQ== X-Google-Smtp-Source: AH8x224jQi+T0jUuHxp4O5GC2ktqtq2fLw+5+t7xYYowtPdkxu8XY/sb9TsBjNtsNpvL5dAwcbQV14IwqwPpfCtfBlI= X-Received: by 10.223.172.167 with SMTP id o36mr2098832wrc.34.1519085235307; Mon, 19 Feb 2018 16:07:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Mon, 19 Feb 2018 16:06:54 -0800 (PST) In-Reply-To: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> From: Alexei Khlebnikov Date: Tue, 20 Feb 2018 01:06:54 +0100 Message-ID: Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/alternative; boundary="001a11474524d5881c056599976c" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: Michael Albinus , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --001a11474524d5881c056599976c Content-Type: text/plain; charset="UTF-8" 2018-02-20 0:41 GMT+01:00 Dmitry Gutov : > 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? > I've just tested - yes, it solves the problem as well! --001a11474524d5881c056599976c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
2018= -02-20 0:41 GMT+01:00 Dmitry Gutov <dgutov@yandex.ru>:
Failing that, why don't we try something el= se 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?
<= /blockquote>

I've just tested - yes, it solves the problem as = well!

--001a11474524d5881c056599976c-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 19:18:02 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 00:18:03 +0000 Received: from localhost ([127.0.0.1]:51839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1envdC-0000SO-PR for submit@debbugs.gnu.org; Mon, 19 Feb 2018 19:18:02 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1envdB-0000Ru-49 for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 19:18:01 -0500 Received: by mail-wm0-f44.google.com with SMTP id 191so11117023wmm.4 for <21559@debbugs.gnu.org>; Mon, 19 Feb 2018 16:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=wcuxAvaI8j4HvZoUoebJH8o3CUYi7IaUCGF27X57uaI=; b=MOi7CuX/d9Exe5af0V1Wa26AIoo+ONojHsh5ZW6BJ4BgFKxuMx2mdEc+zCSO7KUmd8 mV+5oTo2JSFnIsNg0YW59El/XirxL0BN2WxlsICwaOX7he3Zo3RctkXoqkqKo3wQ9G6a GW1SHXG0m5V7uEyNXacvb2ID4Vlxx0hHHQVn9hL3aMig5ZiK2MhEvABduJ7Wgm6RlHdU SHLrCNIXaTzX/4w8i5TROx2s0191Ygaul4g8UPrIZotwSmJ/VnFnr3Oz/NDuc5G3gmRe GqH6vQZ0kpIRjzQCZKsiMednb45EhMofkHe75H+Aevzi1uSdMQ7MRk4rV19oiDhQz4kh iC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wcuxAvaI8j4HvZoUoebJH8o3CUYi7IaUCGF27X57uaI=; b=Yxxu+ZNTGWJiKpgX46yQX/VXv+S8JPlY+CMcpc7khC7Qsu40TOHu9c9KmR3ZoaExZM 1g/2KJsPsykUwSgG4EQFsjkBE8dR3tWyWH773ujeTc/pb6hhiTSk7Q015Q53GnTRtyRx vQlu6Z++ZkIKPW6sPyJbhGpM+W+ECOgg27bc0ceHGLa/6ylO5RFvhLRewTjG/tKvw+MM APlnONA/qMHEy/eO5LAzKBswQy39pvfuueNhOfhkbI1YLN9q/Mo+AItxLrTpKB2XojzS Qv5KSLfGpjnXtTZGVEM5ZArMqCJdwijQHaT4GT1n1ZY/A2waxW2qqkJMAhXSMVUrciV1 /PMA== X-Gm-Message-State: APf1xPABbA5vl1OdP9xirzP256a1xyyqGcyFCBlu07mjZVoZvGatA/UE bAjBhRFCbObXCgVGl6AZhw8= X-Google-Smtp-Source: AH8x224iDEfkfm/dNKfjvGdT5P7cqj8S4bp7z1jX7m9i4brik+/foLQCYaxSvYRfVLlxsEbgBZSnCw== X-Received: by 10.28.191.75 with SMTP id p72mr6809996wmf.109.1519085875526; Mon, 19 Feb 2018 16:17:55 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id e5sm17503161wre.51.2018.02.19.16.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 16:17:54 -0800 (PST) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Alexei Khlebnikov , 21559@debbugs.gnu.org References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> From: Dmitry Gutov Message-ID: <1e8a691e-4963-8ceb-3be5-7d081e3b932b@yandex.ru> Date: Tue, 20 Feb 2018 02:17:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559 Cc: Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2/20/18 2:06 AM, Alexei Khlebnikov wrote: > 2018-02-20 0:41 GMT+01:00 Dmitry Gutov >: > > 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? > > > I've just tested - yes, it solves the problem as well! Terrific, thank you. What do others think? Michael, Eli? From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 23:07:11 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 04:07:11 +0000 Received: from localhost ([127.0.0.1]:51985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enzCx-0007ze-3O for submit@debbugs.gnu.org; Mon, 19 Feb 2018 23:07:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enzCv-0007zQ-2q for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 23:07:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enzCp-0001r7-6u for 21559@debbugs.gnu.org; Mon, 19 Feb 2018 23:07:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enzCk-0001p6-KE; Mon, 19 Feb 2018 23:06:58 -0500 Received: from [176.228.60.248] (port=3222 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1enzCj-0003V3-6k; Mon, 19 Feb 2018 23:06:57 -0500 Date: Tue, 20 Feb 2018 06:07:07 +0200 Message-Id: <838tbo8ftg.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <1e8a691e-4963-8ceb-3be5-7d081e3b932b@yandex.ru> (message from Dmitry Gutov on Tue, 20 Feb 2018 02:17:51 +0200) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <1e8a691e-4963-8ceb-3be5-7d081e3b932b@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, alexei.khlebnikov@gmail.com, michael.albinus@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Dmitry Gutov > Date: Tue, 20 Feb 2018 02:17:51 +0200 > Cc: Michael Albinus > > On 2/20/18 2:06 AM, Alexei Khlebnikov wrote: > > 2018-02-20 0:41 GMT+01:00 Dmitry Gutov > >: > > > > 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? > > > > > > I've just tested - yes, it solves the problem as well! > > Terrific, thank you. > > What do others think? Michael, Eli? Fine with me, but please add a comment there explaining why we do that, as the relation between auto-revert and Git is entirely not obvious. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 02:41:02 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 07:41:02 +0000 Received: from localhost ([127.0.0.1]:52080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo2Xs-00057i-LT for submit@debbugs.gnu.org; Tue, 20 Feb 2018 02:41:02 -0500 Received: from mout.gmx.net ([212.227.17.21]:58919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo2Xq-00057P-Po for 21559@debbugs.gnu.org; Tue, 20 Feb 2018 02:40:59 -0500 Received: from detlef.gmx.de ([212.86.54.29]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MDV5t-1eztSY3Mzt-00Gm73; Tue, 20 Feb 2018 08:40:51 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> Date: Tue, 20 Feb 2018 08:40:50 +0100 In-Reply-To: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> (Dmitry Gutov's message of "Tue, 20 Feb 2018 01:41:55 +0200") Message-ID: <87fu5w2jnh.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:LACy8aLFvPALZunOBxob0eEMeShCGikgg9Qv6E1WMEjAmCOs09Y pO5U2wA6vQWWXHrBOBd4YlF6f5/2/+2fu49Tn5Ow6oNaj/OWEYUC0sUiMWdwePHCRdo/8uJ UB+nCN71068kBFYNZ4vhonnAPCdiXJf+hrEn8YlBG5J+PXQsJ9chsrXyY+9wCXtgHj9cjan Dw3SPyWUrBzDfSMhuEZag== X-UI-Out-Filterresults: notjunk:1;V01:K0:QWUIETURruA=:j7YcNWW2/R9tO2f+TDecdS mQyqCX72rKfTYuvYtqUY7O7mNGBxhFUfbfB77qOx2qzke6zf00VBMUhs+E22DYz4YDrGTeIOy TQY2XVHmq6QT45hEDp06mfz4NKCOQ6lOYc+QRmkJqcF4AuXxsTwd2Vdp2KWubA+QC71l22z5J WwqSZzXBvjR3TKV45iq5kiTqIqYC4Y5ryoKN6MRLPoQV4qutSiRxVPoNMaMx/UWznDwiCpZz+ SvYa9uktCcXm2qmb0Nj5qRST9kj2rJV+aq4ja9wDlqIehBe6UbCutbAcx+GPh3fspqYLRaaWd AMkCPHBlYrSpZDMVn6DbyoJSxzDLhgD5bAQFGoam04BZaDwK4FloMgR92y5vEVFwjW+9KaUy8 muhLUoE2DX2gFQxKJ8g4SlRr37oO+3qz+yj4Ovhl2SaRDIJaHpJFd93fRny1sxkS0FShUX1MQ U6Q+HRwS9ih9h6OC10no6noO8r74eq9D2WZ7YSidQI3gStwARqFtlV72rkWs/DU/Wa0IHark1 GJjbphNXKMh+nK/de2NdtPw8wqn92WoZOlSmIu6Ko9nxj6AasYb8mnp0mDQqPTe0rivUt125U MVf8VkoWwPJtnR1ybl3FIYgTvLLllDMCwOX5qlBR0CVv7Wn5ei0va7KSPEyDft9OddSKSnmh/ sPBzRBiAGzj/v2Vjn1N7mRhbpvLd53e4SUiL5h7uRKXT1CR9VYa6Cl0nDxaYSogen91xwnTgi 0uPQ0JqhpBVtvHni+6EVdWGUFa5qPLCm6JU3pOBbTuDpr2UuBiKIwTQ4HcsjAahD21DCDA59l BjAIn0kHQLmaGnnQQEWHkComWnmOQmxXuG47AkpUfdbI51dBRw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Alexei Khlebnikov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: Hi Dmitry, > 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? I'm not so happy seeing git specific code in autorevert.el (yes, I know, it's just an environment variable). All git specifics shall be kept in vc-git.el. Otherwise, we would go into a dependency nightmare, soon. Do you know, that magit would like to see this setting? If this variable hurts for standard operation of vc-git, we could set it depending whether (auto)revert is running, or not. There is the variable `revert-buffer-in-progress-p', which is non-nil if reverting is in progress. I could set it also before calling `vc-refresh-state' in `auto-revert-handler'. And in vc-git.el, `process-environment' could be extended or not, depending on the value of `revert-buffer-in-progress-p'. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 06:37:31 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 11:37:31 +0000 Received: from localhost ([127.0.0.1]:52180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo6El-0002FX-9g for submit@debbugs.gnu.org; Tue, 20 Feb 2018 06:37:31 -0500 Received: from mail-wr0-f172.google.com ([209.85.128.172]:36148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo6Ei-0002FJ-TO for 21559@debbugs.gnu.org; Tue, 20 Feb 2018 06:37:29 -0500 Received: by mail-wr0-f172.google.com with SMTP id u15so13435117wrg.3 for <21559@debbugs.gnu.org>; Tue, 20 Feb 2018 03:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BFrJ/+ltl7K7dps/H44hHowRUcHirZ03iwFtZyl89BA=; b=Y10gh/WDL4neb69HQmlX+eVCumxkHteMvc9Pr2zxOe5XOmIiwckiRTSEFMP6u1nmgf PaNGIEVhub/C+GtgmOOVsski4h0OEWQxgH8oi02WovNOv7ScoyJvOplIslPIYmMXupek 3IIGp40gdx5t22XpBtCZaTwO22yQCgmWgoyH3xU317GFTxegQtgGkYSsSzYso0Urxkjr QpWB3X+FvVWFtD6y59TgdxUlr7aWOXhAiaYyuoLidmyCWow2y1agPUv7x725jqjnO3HO byFrPn3jVZ5yat5xpdMu+mencX83pXlE3R2PK7bKXNEjAkI9LCURS4dJD55D0SToFaXe ZHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BFrJ/+ltl7K7dps/H44hHowRUcHirZ03iwFtZyl89BA=; b=FqZKYskHsLtrgf9rOyWmgWNMiM+Fk8mOz1ywp09cCDSQ+dHGIzOODzF3sUWTpm4Bu1 tWkT7Q/bMaHu8GkfnVdH5GvQ2rmP4bvb6nNSzxUzUqeXNteB3WME72bMJbXjVNO1lzxq VopMLqw9sHuuD6Gv8jYjttMNFM6+rLiPHGwa+HB8FmMZGZe+dokkAzY2bfS+hEcZ9QKt tKdOPSXH4GtN6ImlA+WttN8nQCpsQoft3XADYk9IIMXhtrXM0DQlSb08yhKLSSKw+bsQ IGA+M9Nbbfu9wXA63vqcJd2DWVzCJ8/fmaVuC0f4KP8WSwoenTy/ZN+vVf6FnRUByy/o HOrg== X-Gm-Message-State: APf1xPAjjFqIwoMKwd7khRhusNY7sU6Sa7XvIJGyySKxojCrs4rz/SAP daVay9jp0sYc6BGbpLz4dNprjtFJ X-Google-Smtp-Source: AH8x227PSEwvjZR17dQniPXNY68GiBv9VM+OslY/eZx2070jnxXk9EqIwMc2yk0/v856rXMMAh7J6w== X-Received: by 10.80.171.166 with SMTP id u35mr10075984edc.117.1519126642693; Tue, 20 Feb 2018 03:37:22 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id a14sm14944959edn.93.2018.02.20.03.37.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 03:37:21 -0800 (PST) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Michael Albinus References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> From: Dmitry Gutov Message-ID: <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> Date: Tue, 20 Feb 2018 13:37:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <87fu5w2jnh.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Alexei Khlebnikov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2/20/18 9:40 AM, Michael Albinus wrote: > I'm not so happy seeing git specific code in autorevert.el (yes, I know, > it's just an environment variable). All git specifics shall be kept in > vc-git.el. Otherwise, we would go into a dependency nightmare, soon. But this way the patch is much smaller, isn't it? That has maintainability benefits too. And using a variable would make more sense if we determine that other facilities, not just autorevert, make VC calls that we want to consider "background". > Do > you know, that magit would like to see this setting? I imagine it would, if it makes Git calls during autorevert (and if doesn't, the var won't do anything). But we could let it make that choice by itself, of course. > If this variable hurts for standard operation of vc-git, we could set it > depending whether (auto)revert is running, or not. There is the variable > `revert-buffer-in-progress-p', which is non-nil if reverting is in > progress. I could set it also before calling `vc-refresh-state' in > `auto-revert-handler'. And in vc-git.el, `process-environment' could be > extended or not, depending on the value of `revert-buffer-in-progress-p'. In which part of vc-git.el? Changing the implementation of two commands, like the original patch proposed, makes for a bigger change. We could do that in vc-git-command, I suppose... From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 06:53:49 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 11:53:49 +0000 Received: from localhost ([127.0.0.1]:52196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo6UX-0002gE-41 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 06:53:49 -0500 Received: from mout.gmx.net ([212.227.15.15]:33425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eo6UV-0002fu-TY for 21559@debbugs.gnu.org; Tue, 20 Feb 2018 06:53:48 -0500 Received: from detlef.gmx.de ([212.86.54.29]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MgbTj-1f9ubK2aFr-00Nxd4; Tue, 20 Feb 2018 12:53:41 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> Date: Tue, 20 Feb 2018 12:53:40 +0100 In-Reply-To: <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> (Dmitry Gutov's message of "Tue, 20 Feb 2018 13:37:18 +0200") Message-ID: <87po4z512z.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:miskIA10IBJ8TXJSJK/qOUZEFNllttaKFZvvRed6XDk9e0tu4wp O+dHGlzm0dNJeVd2ZZG/MyvVVHUP9r0h/QbqUy/xHw9Btx36kcAfodcfGcljNS2cgqBifwy 25aTqx7mJYJ7W1J9ZYtxFtR33DBxDZb/rhr962BkoXnJfe4zXGJO+qOm7PgVHMGZcznvBDf vYRwS1OtfjHNkTQzwNrog== X-UI-Out-Filterresults: notjunk:1;V01:K0:5ySo6EdrElo=:1RRmEA6e2/eK1JmyNpmcr1 wvIh6ylLyTvMi0W9vvVyrqb9UKr+TDFMgf7Sy8rZp//OIrrKtRj2ezHAyRHao2Z30/5bQK/cO lqq5WovrcpH1rE+idyWXYStqq3rDBu/992UaBrsd2hEpSzEXlZj5wA7DmP75F0OGRD+9TQPgf yMZ++WypB5hrs/C3wZJMsvg3AH0lyHa9Pi2h3QPQzt//WuONyCqNTMoMJOP2+s0RecjhERWuq XpGxpBfGylqLAsk2cVsCIIc8itoX3+RXY+L6Pr+jeIaeakYgTHNjQ51W2+zPYuDLAkUQh8kZS jskZSZUO1FIiCgTv9UW3tvp34WHRIqaEe3FdsfjlwIUb4qvsLML3T7FhB23ZUkFqNlHm6X/LM Lpyj/dcU09x92NgfN28IHMGNxWC1tV7RNFKUk8Xvo8iJcwZYw9RdO2+OSH/TWzlc8UgeW6jcR izJCOXO68DVCHoeB4cMX57/9o2dhEtLE81nmIJPmPtlAofLwnN8mkFIpK8Q81PPUt8jLAK0Ax DWF2eYu4vaTZY04XuXmw3KhObbRATbmStOwF65OcPZBk5n29ZMF+5bTbAURv4jln7ySxlyuBb ST9LUNZJhFLjRAXf5LwkR7/4ne8zUa0868qY+UlFA7GegAUfizPILUoZVowfToYj5lEjAmBZE cMyyDlCKatbl2OnrKXDngV0MZqVEtS9XRB0xJg5ybbjqJz924XG++Q5+AuO+bZJuh88O/6LZG 2IXM/rpXBvua20GUue77y9ew0X2zKK1/53yy1EhGgWzGMxl4q4zuofRcwCuFC3BR/yzmi5ACw uTFpkO245HrpTJgrEuxJBzsIVs6enzfhO82iRHgqbnkqnhLkiM= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Alexei Khlebnikov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Dmitry Gutov writes: Hi Dmitry, >> I'm not so happy seeing git specific code in autorevert.el (yes, I know, >> it's just an environment variable). All git specifics shall be kept in >> vc-git.el. Otherwise, we would go into a dependency nightmare, soon. > > But this way the patch is much smaller, isn't it? That has > maintainability benefits too. A dependency nightmare counts much more, IMHO. > And using a variable would make more sense if we determine that other > facilities, not just autorevert, make VC calls that we want to > consider "background". autorevert wouldn't care who uses this variable. In a broader sense, it could let-bind it for the whole auto-revert-handler body. >> If this variable hurts for standard operation of vc-git, we could set it >> depending whether (auto)revert is running, or not. There is the variable >> `revert-buffer-in-progress-p', which is non-nil if reverting is in >> progress. I could set it also before calling `vc-refresh-state' in >> `auto-revert-handler'. And in vc-git.el, `process-environment' could be >> extended or not, depending on the value of `revert-buffer-in-progress-p'. > > In which part of vc-git.el? Changing the implementation of two > commands, like the original patch proposed, makes for a bigger change. > > We could do that in vc-git-command, I suppose... Perhaps. autorevert shouldn't know anything about vc-git, it should just let-bind the variable, and let other packages decide whether they use it. FWIW, I'm also not so enthusiastic, that aut-revert-handler calls vc-refresh-state directly. This would be better organized by a hook. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 17:28:46 2018 Received: (at 21559) by debbugs.gnu.org; 20 Feb 2018 22:28:46 +0000 Received: from localhost ([127.0.0.1]:53360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoGOz-0006IZ-OP for submit@debbugs.gnu.org; Tue, 20 Feb 2018 17:28:45 -0500 Received: from mail-wr0-f169.google.com ([209.85.128.169]:34864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoGOy-0006IK-C8 for 21559@debbugs.gnu.org; Tue, 20 Feb 2018 17:28:44 -0500 Received: by mail-wr0-f169.google.com with SMTP id l43so18803708wrc.2 for <21559@debbugs.gnu.org>; Tue, 20 Feb 2018 14:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DeJ8amUwROJ2jehAmIyS7r7kcrRbGUpu7F2GCs5BmXw=; b=btXqCIenFO+RnK/WLe8dVD1FmvCiK+bCGJfIr3bRdj98WSsxI+oaGOBGBkd+tHJ+Gh HHhyhB8zklwMmuE59vWEUbyzzh/U+9HkkCS4EOPNGKckolibaDYkwZdpvjXes6/ojfkr /Vb+MJYRiYvc4rX2yPlZHkaYjxOe6egNm8zeDXr3Z75Qm7LUi6TT/RkHgCYs/SVqWqto iPzF1BqWD8ykhQ/hVYihry23Fn0IGzhahV0mwqAPFiFkkUURHuyp4rtzlHNP8UKe4N/E Ebv9g7C3gKUN2pGd90BoAd4dA04u0muoCr5TRVb9p7Kld8lMwqN1W9bsuQaj0GZ0GrbX h66Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DeJ8amUwROJ2jehAmIyS7r7kcrRbGUpu7F2GCs5BmXw=; b=En9jgs5I5muKyBFJF3vwzuZA58BNhWWvzKJwa3WS/DgIrcrW6GbzZmory60orQ56in hGFHbBlRNw5rumY85s+1s5pwS/O/Y9urlp+fH/uPh4iqHiuXvF8lYw4D1ko/hJa6vLz4 XKfsBgGh416xOx+WQcT/vNcpQ2n21aGARDdCflteieGYvZW7OI2oEFm6xgFuDvSytnz3 xqKJHK40Hly5rQuDuAo4FW+03ZIzrwv9dVj8W6uCD2LVeeG3TH7GwxdryRtfiHUj8yCT hgimMlLzqrV/AI2m+ySlyng9qNn0takoDkTsVa3akZBTfYvkUpqh/XU/2si1B9dgHdBF TupQ== X-Gm-Message-State: APf1xPCmVJNETd2cvYvhA9rkR4qT4WiCLIWKmZv8xZ0wQUmGxiBr+0Uv PTdugJVTaGmJ9tXhRceZUnQ= X-Google-Smtp-Source: AH8x2264B1JWGLaIcMiLysWWU5+y/FQcLcgGdVePIroaZ/BSB6tvTdKoXSV7yotiV/nAEmr6gnlt3A== X-Received: by 10.223.196.250 with SMTP id o55mr1036678wrf.200.1519165718456; Tue, 20 Feb 2018 14:28:38 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id v191sm20585378wmf.25.2018.02.20.14.28.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 14:28:35 -0800 (PST) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Michael Albinus References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> <87po4z512z.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Wed, 21 Feb 2018 00:28:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <87po4z512z.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, Alexei Khlebnikov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2/20/18 1:53 PM, Michael Albinus wrote: > A dependency nightmare counts much more, IMHO. A nightmare isn't going to arrive overnight. >> And using a variable would make more sense if we determine that other >> facilities, not just autorevert, make VC calls that we want to >> consider "background". > > autorevert wouldn't care who uses this variable. In a broader sense, it > could let-bind it for the whole auto-revert-handler body. I meant that if there's going to be more places that are going to *bind* this variable. In that case, moving the relevant code into vc/* would be unavoidable. >> We could do that in vc-git-command, I suppose... > > Perhaps. autorevert shouldn't know anything about vc-git, it should just > let-bind the variable, and let other packages decide whether they use > it. All right, so you just want to move the responsibility. > FWIW, I'm also not so enthusiastic, that aut-revert-handler calls > vc-refresh-state directly. This would be better organized by a hook. On the other hand, since it already has this direct call, an extra let binding isn't going to change much. Anyway, it's your choice here. Do you want to show an alternative patch? From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 21 17:07:45 2018 Received: (at 21559) by debbugs.gnu.org; 21 Feb 2018 22:07:45 +0000 Received: from localhost ([127.0.0.1]:54985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eocYD-0005eb-5W for submit@debbugs.gnu.org; Wed, 21 Feb 2018 17:07:45 -0500 Received: from mail-wr0-f172.google.com ([209.85.128.172]:45506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eocYB-0005eO-Vd for 21559@debbugs.gnu.org; Wed, 21 Feb 2018 17:07:44 -0500 Received: by mail-wr0-f172.google.com with SMTP id p104so8564624wrc.12 for <21559@debbugs.gnu.org>; Wed, 21 Feb 2018 14:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EizS5jgch0ct9Ry3eyaZCcSlt/8j///6flqa5bR9E2g=; b=HY6nwdhuB38b1cqCKeIelpyPPFZrElS6qhLJyWCdYi35oe+lRj2aL9sDICI1xdIZy8 OWU6c+6Tsq+5ZL6mfMKhZiEyvZMQb+dwcmS7JbHC2ZYfyr7su8uQLzamfH0UDWFer+Gf LOIpV53YSe/xcAZiLVLIKl74D4lGI2HisTzLfqgYP7/uA8J3gb14woSIbIeaGz7utCGE XvEwe7g9JmqAkpFB0yQ01QxcjsqAqzXK/Ne4l7loXC7XO+oDk5MaijjB7aPEbvMGMFHg 9rQwpeCEeyFzXgq8zkGsrFxUsX2jU4im5MJqHOh6y0uFJDTPYXqWk+WBrYwhnCa3T7im imbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EizS5jgch0ct9Ry3eyaZCcSlt/8j///6flqa5bR9E2g=; b=m3zpkI8wmriYldZfrkpwWfuG932/+iEBQbQ2dVxPsmnipYJS3AxHWo4jH++lIm5OM1 0OvZSgCQNfZ4eTp6GORrQ7CBBD6MvQ+RRFo4MN91re2uZy8qnSG70cPkt1GHEOtwFfcJ 9b2BZW+NRNRDCIgHj82k4Rv/oTJvWa340gBnv6Q2PXkmakUOgH7J5I2Fs8VLNUuBIvpu hzs5yvTDGLZMzyDlPoMZI9qxcQnnWy5NgW33Gy9gf3U/ykdLBvkuViZw7/k2qrr7Xisf NhEnp34dqrx4mWCuQMgl4bdTTzmQtF6TSAzP/uUqDoiDbr8t0v81hCoWD4WLweopBgUS TXmg== X-Gm-Message-State: APf1xPC+meSLZqlCjlUYZkWidnkX3KV+WjHlTCKYW7sI/atetsAzpWKG NX2IHCKhZ/peZyoUf2eace+/pAQ8qyRbYbSzce2AGQ== X-Google-Smtp-Source: AH8x225eS1agNYj/IWCmxoKf48yVtqXmbbTOJRWqRSIkiUoZIMnmQX0I+GwnpHzcNsyeVJr5Nm5D0x7xWNpOEFM9Ib8= X-Received: by 10.223.151.129 with SMTP id s1mr4353501wrb.206.1519250857966; Wed, 21 Feb 2018 14:07:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.229.138 with HTTP; Wed, 21 Feb 2018 14:07:17 -0800 (PST) In-Reply-To: References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> <87po4z512z.fsf@gmx.de> From: Alexei Khlebnikov Date: Wed, 21 Feb 2018 23:07:17 +0100 Message-ID: Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: 21559@debbugs.gnu.org Content-Type: multipart/mixed; boundary="94eb2c1b656cb712640565c02782" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21559 Cc: Michael Albinus , Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --94eb2c1b656cb712640565c02782 Content-Type: multipart/alternative; boundary="94eb2c1b656cb712600565c02780" --94eb2c1b656cb712600565c02780 Content-Type: text/plain; charset="UTF-8" Here is version 4 of the patch. "revert-buffer-in-progress-p" flag is set in "auto-revert-handler", according to Michael's idea and then checked in "vc-git-command", according to Dmitry's idea. I have tested the patch, it works. --94eb2c1b656cb712600565c02780 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is version 4 of the patch.

"revert-b= uffer-in-progress-p" flag is set in "auto-revert-handler", a= ccording to Michael's idea and then checked in "vc-git-command&quo= t;, according to Dmitry's idea.

I have tested the patch, i= t works.

--94eb2c1b656cb712600565c02780-- --94eb2c1b656cb712640565c02782 Content-Type: text/x-patch; charset="US-ASCII"; name="v4-0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebas.patch" Content-Disposition: attachment; filename="v4-0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebas.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jdxmfskw0 RnJvbSBkNmNmZmU5ZjdjYjBjNzgyN2ViNDdiMTNiOTIyMjkxNDE4ZWE4ZWJmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4ZWkgS2hsZWJuaWtvdiA8YWxleGVpLmtobGVibmlrb3ZA Z21haWwuY29tPgpEYXRlOiBXZWQsIDIxIEZlYiAyMDE4IDIyOjM0OjIyICswMTAwClN1YmplY3Q6 IFtQQVRDSCB2NF0gRml4IGZvcjogIjI1LjAuNTA7IGF1dG8tcmV2ZXJ0LW1vZGUgYnJlYWtzIGdp dCByZWJhc2UiCiAoQnVnIzIxNTU5KQoKKiBsaXNwL2F1dG9yZXZlcnQuZWwgKGF1dG8tcmV2ZXJ0 LWhhbmRsZXIpOgogIFNldCAicmV2ZXJ0LWJ1ZmZlci1pbi1wcm9ncmVzcy1wIiBmbGFnCiAgYmVm b3JlIGNhbGxpbmcgInZjLXJlZnJlc2gtc3RhdGUiLgoKKiBsaXNwL3ZjL3ZjLWdpdC5lbCAodmMt Z2l0LWNvbW1hbmQpOgogIElmICJyZXZlcnQtYnVmZmVyLWluLXByb2dyZXNzLXAiIGZsYWcgaXMg c2V0LAogIHByZXBlbmQgIkdJVF9PUFRJT05BTF9MT0NLUz0wIiB0byAicHJvY2Vzcy1lbnZpcm9u bWVudCIuCi0tLQogbGlzcC9hdXRvcmV2ZXJ0LmVsIHwgMyArKy0KIGxpc3AvdmMvdmMtZ2l0LmVs ICB8IDkgKysrKysrKystCiAyIGZpbGVzIGNoYW5nZWQsIDEwIGluc2VydGlvbnMoKyksIDIgZGVs ZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9hdXRvcmV2ZXJ0LmVsIGIvbGlzcC9hdXRvcmV2 ZXJ0LmVsCmluZGV4IGNmMTQ1ZTBlZTMuLjBhOWQzYmVmNTQgMTAwNjQ0Ci0tLSBhL2xpc3AvYXV0 b3JldmVydC5lbAorKysgYi9saXNwL2F1dG9yZXZlcnQuZWwKQEAgLTcwOSw3ICs3MDksOCBAQCBh dXRvLXJldmVydC1oYW5kbGVyCiAgICAgOzsgYHByZXNlcnZlLW1vZGVzJyBhdm9pZHMgY2hhbmdp bmcgdGhlIChtaW5vcikgbW9kZXMuICBCdXQgd2UgZG8KICAgICA7OyB3YW50IHRvIHJlc2V0IHRo ZSBtb2RlIGZvciBWQywgc28gd2UgZG8gaXQgbWFudWFsbHkuCiAgICAgKHdoZW4gKG9yIHJldmVy dCBhdXRvLXJldmVydC1jaGVjay12Yy1pbmZvKQotICAgICAgKHZjLXJlZnJlc2gtc3RhdGUpKSkp CisgICAgICAobGV0ICgocmV2ZXJ0LWJ1ZmZlci1pbi1wcm9ncmVzcy1wIHQpKQorICAgICAgICAo dmMtcmVmcmVzaC1zdGF0ZSkpKSkpCiAKIChkZWZ1biBhdXRvLXJldmVydC10YWlsLWhhbmRsZXIg KHNpemUpCiAgIChsZXQgKChtb2RpZmllZCAoYnVmZmVyLW1vZGlmaWVkLXApKQpkaWZmIC0tZ2l0 IGEvbGlzcC92Yy92Yy1naXQuZWwgYi9saXNwL3ZjL3ZjLWdpdC5lbAppbmRleCA0NzE3MmRkNTJm Li5iMWE1N2FiNmY0IDEwMDY0NAotLS0gYS9saXNwL3ZjL3ZjLWdpdC5lbAorKysgYi9saXNwL3Zj L3ZjLWdpdC5lbApAQCAtMTU2Niw3ICsxNTY2LDE0IEBAIHZjLWdpdC1jb21tYW5kCiAgICAgICAg ICAob3IgY29kaW5nLXN5c3RlbS1mb3ItcmVhZCB2Yy1naXQtbG9nLW91dHB1dC1jb2Rpbmctc3lz dGVtKSkKIAkoY29kaW5nLXN5c3RlbS1mb3Itd3JpdGUKICAgICAgICAgIChvciBjb2Rpbmctc3lz dGVtLWZvci13cml0ZSB2Yy1naXQtY29tbWl0cy1jb2Rpbmctc3lzdGVtKSkKLSAgICAgICAgKHBy b2Nlc3MtZW52aXJvbm1lbnQgKGNvbnMgIkdJVF9ESVIiIHByb2Nlc3MtZW52aXJvbm1lbnQpKSkK KyAgICAgICAgKHByb2Nlc3MtZW52aXJvbm1lbnQKKyAgICAgICAgIChhcHBlbmQKKyAgICAgICAg ICBgKCJHSVRfRElSIgorICAgICAgICAgICAgOzsgQXZvaWQgcmVwb3NpdG9yeSBsb2NraW5nIGR1 cmluZyBiYWNrZ3JvdW5kIG9wZXJhdGlvbnMKKyAgICAgICAgICAgIDs7IChidWcjMjE1NTkpLgor ICAgICAgICAgICAgLEAod2hlbiByZXZlcnQtYnVmZmVyLWluLXByb2dyZXNzLXAKKyAgICAgICAg ICAgICAgICAnKCJHSVRfT1BUSU9OQUxfTE9DS1M9MCIpKSkKKyAgICAgICAgICBwcm9jZXNzLWVu dmlyb25tZW50KSkpCiAgICAgKGFwcGx5ICd2Yy1kby1jb21tYW5kIChvciBidWZmZXIgIip2Yyoi KSBva3N0YXR1cyB2Yy1naXQtcHJvZ3JhbQogCSAgIDs7IGh0dHBzOi8vZGViYnVncy5nbnUub3Jn LzE2ODk3CiAJICAgKHVubGVzcyAoYW5kIChub3QgKGNkci1zYWZlIGZpbGUtb3ItbGlzdCkpCi0t IAoyLjE1LjEKCg== --94eb2c1b656cb712640565c02782-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 22 06:24:26 2018 Received: (at 21559-done) by debbugs.gnu.org; 22 Feb 2018 11:24:26 +0000 Received: from localhost ([127.0.0.1]:55357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoozC-0001Ue-66 for submit@debbugs.gnu.org; Thu, 22 Feb 2018 06:24:26 -0500 Received: from mout.gmx.net ([212.227.17.20]:56221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoozA-0001UR-4t for 21559-done@debbugs.gnu.org; Thu, 22 Feb 2018 06:24:24 -0500 Received: from detlef.gmx.de ([213.220.147.126]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LjZn2-1eDHJJ3E1g-00bfMe; Thu, 22 Feb 2018 12:24:17 +0100 From: Michael Albinus To: Alexei Khlebnikov Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> <87po4z512z.fsf@gmx.de> Date: Thu, 22 Feb 2018 12:24:16 +0100 In-Reply-To: (Alexei Khlebnikov's message of "Wed, 21 Feb 2018 23:07:17 +0100") Message-ID: <87efldfesf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:lGbP8yFWiE0ZP+qbN9pe8Aw0lkK+Jn8jP3Gi32FQ7I4dxSzRtTW vcXoErjVOZ/IVMOoiGrgSUbPmqMWdaIix0vricKPOzZ2MfAECODdTQ16vAS8svhY2hLl07p +6ljQe8nvnLR7cLYsHdZZDVZVK+cUU2dMKKC6vxyBn+BqJm4wxaz+JMC+TIvadhL4WJDPUN 5TDmDop7ifP8emTIBkHHg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HetrtmlTZl0=:hsp+qmVV3N8wBTly5H7KVG 71XmDp9h7v01C52PEVrPQ8WGbfu8IaAKDKc8mxCvJXlJHwMT+S1ZUhxN5gRCTB+PE1Elxw5Tj n+DwQDSluSk/By8LvqpvyJQfLB4yFNXzj1XftJiO0uWpMe6K2MddBrxi9p31qnjJDyr5n3iMS n8ndx9U2g/TYw/j1gHSHrhqg9P5jSFd8ZSSPYXyO2+eJddSvulk+1/5/z+J1l4zITIDBNh1TU jOv3wQFN/kWUhYdIVusTIjgze8/ISeMpfqeRRoeUWRnOivVYcDODxveCcxDsDSXEn5m0gtd6W N6gduVzmtg4qPy6itx46wSMr8WUAC/66GQCWOPgm17zgSR5dMJO1sxdd3jpX51hZtFLPl0T6L kNt3nzV5V6/LMCEJbOW/SPPuo8jFmI+NeuWcsIhSZKcdYKUFgvF3q0Swa5JrU024r9BGPuX2l yufdkK40U6oRQPVtHBs3PajTZ3ztcLt/Mveropny91AW9zrFj0QjDXi5mEPQLR4qfZDWM6xkk QMrneJZCWfsHQJmRaU5yhdufYK9IlOJOm1a2MXzhoUouXJ0kTgk+caJKalA0k9e27uq9ESSJx fO20w3luDxTqsGKXh00nI4+0qkQtAquz+JpBm29R/fp17dC5KjuehP4ll1DrHYfskBTDtcIBS 3ehJJFS95ty04LYqi2Ha5zSCmO1a11IxYrX/SsDDEBWLaa/34CA98AbMLCJIfYI59fieRLzGO v/QDDCQW5y7VN1t+hF0f9ZybENOToJnUqih+9O8MEz7a2UJZk8axQ3NBdV3PVxqoj6hTY9dvj Wqsk6ZhB/F7e4kmDIl/58PNPAca1w/Qvsf5DFcq1nqtEFep6yY= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559-done Cc: 21559-done@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Version: 27.1 Alexei Khlebnikov writes: Hi Alexei, > Here is version 4 of the patch. > > "revert-buffer-in-progress-p" flag is set in "auto-revert-handler", > according to Michael's idea and then checked in "vc-git-command", > according to Dmitry's idea. LGTM, I've pushed this to master. > I have tested the patch, it works. Thanks. I'm closing the bug. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 22 06:45:32 2018 Received: (at 21559-done) by debbugs.gnu.org; 22 Feb 2018 11:45:32 +0000 Received: from localhost ([127.0.0.1]:55369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eopJc-00023h-0G for submit@debbugs.gnu.org; Thu, 22 Feb 2018 06:45:32 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:34074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eopJZ-00023T-Ob for 21559-done@debbugs.gnu.org; Thu, 22 Feb 2018 06:45:31 -0500 Received: by mail-wm0-f43.google.com with SMTP id a20so2069058wmd.1 for <21559-done@debbugs.gnu.org>; Thu, 22 Feb 2018 03:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=beFVL24b7zcESmgDy4+y+Cj5yDD4vM06u+lNi+UeNwg=; b=laBvTjQ0Qz13F9RqIVMKrbEPEcfrhjlDHfLgo733bJcDY/03gKxzqWQWErt6NTIqaB 2cHOun2fQBOoYr9ON/u/DXNZNQ82gRJtt+87ds2gerlvPn1wuZB7d2vUEMCzyjXWJVLD FR3rqabkIElmuckBtebASC0xvgISFVqMpRuXS73dQS6/j15F10LoFExuWtnzWLcSnbe+ fONrDzG0TMY54GlygWbKZETLDh7cFsV/sn2HXiazZvPhTpqCxpLgp74FWUHGjK3T5APE 2yPO6PKIwNY/126PBXTaAJ3q4DZqM8tQzuNJFAfMVN08AHM4E+plTcZyBCKuj9qpn93J FU4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=beFVL24b7zcESmgDy4+y+Cj5yDD4vM06u+lNi+UeNwg=; b=eE+rZ7ur0nM6VuhGh/f4wiMd+Vc2NVrXUQwzn/CeyAqewWs6Rh6kH0KAKnw8bN/nJO 9vwdsBsy10RbUiuS90Gu05trEIh7FEN1Q/SuCoStefpFGPS7b6pjvpCkfQEF3RFz8WeR tIFZwmFrwAgD7BgonzF7zSw8DRQA591QfOg7C4M54T1ZLLPljTGlSSEz2fCm1RiIuAuO fstrugmzc2E+SDir6ZmgjUgdPT+6cm7BirrZUQ45hWWlku7jUs3ttcVXT9YeXl9mSW5l bX0X3K3w+/Vfwxp8RLFlGkcyiOyG/eHM0QmJ9Yj7fspwZW8inRLWGptdxIN18ZKbYhT/ sa5Q== X-Gm-Message-State: APf1xPAAY3A06VqdTmyfTwTsiC5Q5qs/rsLT90xydG+C4fWqqdqz56aY ouL/VveX6XGWpBvApoRi/4gqbUlw X-Google-Smtp-Source: AH8x225Uhc88CvWyp4Nge6yovw5zpOcYna/U46F9u5XIOu+O77MKa0i4uuuRRI1k4J4XXB4hDGMVpg== X-Received: by 10.28.229.213 with SMTP id c204mr4511249wmh.1.1519299921792; Thu, 22 Feb 2018 03:45:21 -0800 (PST) Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id y6sm250987wmy.14.2018.02.22.03.45.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 03:45:18 -0800 (PST) Subject: Re: bug#21559: 25.0.50; auto-revert-mode breaks git rebase To: Michael Albinus , Alexei Khlebnikov References: <5d7808ef-d61f-534d-53b3-bc1227b4c3b1@yandex.ru> <87fu5w2jnh.fsf@gmx.de> <40817863-9c34-9745-6fff-4357d623de20@yandex.ru> <87po4z512z.fsf@gmx.de> <87efldfesf.fsf@gmx.de> From: Dmitry Gutov Message-ID: <26192705-b938-8260-52a4-76a9f4d6ee6f@yandex.ru> Date: Thu, 22 Feb 2018 13:45:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <87efldfesf.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 21559-done Cc: 21559-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On 2/22/18 1:24 PM, Michael Albinus wrote: >> Here is version 4 of the patch. >> >> "revert-buffer-in-progress-p" flag is set in "auto-revert-handler", >> according to Michael's idea and then checked in "vc-git-command", >> according to Dmitry's idea. > > LGTM, I've pushed this to master. Great, thank you both. From unknown Fri Aug 15 15:34:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Mar 2018 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 01:51:22 2018 Received: (at control) by debbugs.gnu.org; 25 Sep 2018 05:51:22 +0000 Received: from localhost ([127.0.0.1]:52745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4gFm-00076V-0J for submit@debbugs.gnu.org; Tue, 25 Sep 2018 01:51:22 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:48609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4ftK-0006SS-Mj for control@debbugs.gnu.org; Tue, 25 Sep 2018 01:28:11 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7537625B for ; Tue, 25 Sep 2018 01:28:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Sep 2018 01:28:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aeruder.net; h= content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iQvB0nUtZuZQSINQ0 5gAqFltjuyMp2X/HruYKIoKQNI=; b=c7QmBtt5pxDdCcVHyofGcklsoPk0crAwd HBjcF81+Ln1ya1Y+6twu8dNTaG1nFcauVRGCD3t1ogVQ7bdT/zfZeJXSMHGRYXwU 30Y40uUEgnzW9YKuqFc7ORwf/PljhcU9QHBnd6IxwoZ6tqY/HLjGm1+ha0G8wbLq jc3UfhB2G2V/kTzC3lk1kTEDHGx3vwnMvlHBaMfYs2pr1owt3sNXblk3k3M0cF5e eP9f35vIk7VBLtYZvYCR/A/iJMzTP4kVkj0/T1aAmZ8Rx1Zg5q/TrpvTZs0vplsv ruUy5rKNhC3o+I4OqsROhOpc+nEUeS8MhkOOnwYhS/tyfQ44qJ9Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=iQvB0nUtZuZQSINQ05gAqFltjuyMp2X/HruYKIoKQNI=; b=T35ctzWX DWD0DibPkG0MajUTL0Ivc2UTH05eLt73ukgSl0Xa8ZAAhtjJhUfs/klF2zSUCK3e eZMqVqa1WaAX22QdW8kMWoD1pNnaAKDBxrtn/5N8IgJaAriIS9dm3w6xKhgFClFQ A73MTmqQe24F5dZwiHwwE3csYmXEktqGTuZXbyuLahJPX4uwvG5Xc0Z/8KgptmIH ExpeyQGdv2uwbIX7D7o9j/GdEmitGNJi8AOt1zvJEPwZGbCZzWnF9yx3nvryx9Qt 09wdgUMyWdWT8s8FGNYYlnjuADujF2bcm6a4A8UQxxpg+1v7mXUFCY60WlRDt06t JbP2qPRdm/oipA== X-ME-Proxy: X-ME-Sender: Received: from aeruder.net (unknown [136.61.93.86]) by mail.messagingengine.com (Postfix) with ESMTPA id 797E5E446A for ; Tue, 25 Sep 2018 01:28:08 -0400 (EDT) Date: Mon, 24 Sep 2018 22:28:07 -0700 From: Andrew Ruder To: control@debbugs.gnu.org Subject: 21559 not fully fixed Message-ID: <20180925052806.GA67961@aeruder.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-Mailman-Approved-At: Tue, 25 Sep 2018 01:51:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) unarchive 21559 reopen 21559 thanks The analysis in this ticket is great, but still missing another edge case for GIT_OPTIONAL_LOCKS. I have patch and explanation, can attach to ticket when open. - Andrew Ruder -- From unknown Fri Aug 15 15:34:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug No longer marked as fixed in versions 27.1 and reopened. Date: Tue, 25 Sep 2018 05:52:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug No longer marked as fixed in versions 27.1 and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 11:14:55 2018 Received: (at 21559) by debbugs.gnu.org; 25 Sep 2018 15:14:55 +0000 Received: from localhost ([127.0.0.1]:53910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4p39-0002i6-EH for submit@debbugs.gnu.org; Tue, 25 Sep 2018 11:14:55 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:50015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4mMz-0006hq-Hr for 21559@debbugs.gnu.org; Tue, 25 Sep 2018 08:23:14 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 8D61F34E for <21559@debbugs.gnu.org>; Tue, 25 Sep 2018 08:23:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Sep 2018 08:23:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aeruder.net; h= content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zeq7fVW3g+ALBrZVc edFJ5tBPZpkrtJ5zP026NlbaQs=; b=EDWo3soDO1Dc5PKvsjZS6TqNY8EZ8RseM O7EtImS7XzFlaei1bj/jj5W/lVixVsu2eH0U+QLXyNsZR/4gQRA4HHR94i38/Xxf 7Q9XvAl+n/acJRS51XnTBAzfgnbqUDuNbeQQvaHrcbufe4Ig078XRPuYg8fEKJyJ 76uJwTmQiheM/iDLVQiMHEtIYRqUuFu2oi20603sg8sIAYtUeZytH2fsd9E1yDYt mXuNhQrgSk3e+ljCzY5U2P7DEZK9+1CQc5xffPswXZsc9DRyer0haBXzSDqUIs24 +nIZQIPGe6APmayvAdX3HIDA4g4wwX3kPaxv6yeIkmaBAn8aM4tAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=zeq7fVW3g+ALBrZVcedFJ5tBPZpkrtJ5zP026NlbaQs=; b=KPoDTCwo J8WgEOR8A2u4TanW6lE4d5J/CADYuVaoONLWIq+d89Gkk4mZI2zCnQBvtB/FoV8h IrS0h12xq0oufqFv5A3cRJptG8CDjJ1ENx9ljKuIl6hrFH/3iSOESn7qQLFv6TtY dS3hFitPEOQvZMG6viNlzt0f5L/18uwk/MeQ6OJMVJbmwomvR+U88cKK9gtw55/j H+wwrE09c3xDdC3pGDmRt+uRzD9n8JlXJwKLd/brgV1s2HUxHWVxJzvLOvLq6KNs DO65nkAEVRkYC1B0yQuW17zuBuaVEQbltAg0rMss8NYwSJqxt9mDeZe/Pvn1yxpm 1BIy23HmAMj9Nw== X-ME-Proxy: X-ME-Sender: Received: from aeruder.net (unknown [136.61.93.86]) by mail.messagingengine.com (Postfix) with ESMTPA id A5663E47C2 for <21559@debbugs.gnu.org>; Tue, 25 Sep 2018 08:23:11 -0400 (EDT) Date: Tue, 25 Sep 2018 05:23:10 -0700 From: Andrew Ruder To: 21559@debbugs.gnu.org Subject: additional patch needed to set GIT_OPTIONAL_LOCKS=0 in all cases Message-ID: <20180925122309.GB68323@aeruder.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline X-Debbugs-CC: michael.albinus@gmx.de, alexei.khlebnikov@gmail.com, dgutov@yandex.ru User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 X-Mailman-Approved-At: Tue, 25 Sep 2018 11:14:54 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Please see attached patch. There is also some early reports of success at https://github.com/magit/magit/issues/2708 In short, I believe the analysis for this bug was thorough (and correct!), but it turns out that the call to `git status` doesn't actually go through the patched function so we'd end up with a few commands getting GIT_OPTIONAL_LOCKS=0 but not the most important one. - Andrew Ruder P.S. still figuring out the contribution process for emacs. --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Fix-for-25.0.50-auto-revert-mode-breaks-git-rebase-B.patch" >From b2a4c67cdd6fe834317416120b96ab943d6a1f7a Mon Sep 17 00:00:00 2001 From: Andrew Ruder Date: Mon, 24 Sep 2018 21:29:00 -0700 Subject: [PATCH] Fix for: "25.0.50; auto-revert-mode breaks git rebase" (Bug#21559) The fix for Bug#21559 is mostly right, but the one command we were trying to protect, git status --porcelain, doesn't go through vc-git-command and wasn't actually getting the GIT_OPTIONAL_LOCKS=0 treatment. * lisp/vc/vc-git.el (vc-git--call): Override GIT_OPTIONAL_LOCKS=0 during revert-buffer-in-progress-p --- lisp/vc/vc-git.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index ca457fb3d1..cc137b2304 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1628,8 +1628,15 @@ vc-git--call (or coding-system-for-read vc-git-log-output-coding-system)) (coding-system-for-write (or coding-system-for-write vc-git-commits-coding-system)) - (process-environment (cons "PAGER=" process-environment))) - (push "GIT_DIR" process-environment) + (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))) (defun vc-git--out-ok (command &rest args) -- 2.17.0 --jI8keyz6grp/JLjh-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 23:16:56 2018 Received: (at 21559) by debbugs.gnu.org; 26 Sep 2018 03:16:57 +0000 Received: from localhost ([127.0.0.1]:54259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g50Js-0006Ei-KG for submit@debbugs.gnu.org; Tue, 25 Sep 2018 23:16:56 -0400 Received: from smtp-3.orcon.net.nz ([60.234.4.44]:38545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g50Jq-0006EY-2p for 21559@debbugs.gnu.org; Tue, 25 Sep 2018 23:16:55 -0400 Received: from [10.253.37.70] (port=52602 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1g50Jm-00034f-3n; Wed, 26 Sep 2018 15:16:50 +1200 Received: from wlgwil-nat-office.catalyst.net.nz ([202.78.240.7]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Wed, 26 Sep 2018 15:16:50 +1200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 26 Sep 2018 15:16:50 +1200 From: Phil Sainty To: Andrew Ruder Subject: Re: bug#21559: additional patch needed to set =?UTF-8?Q?GIT=5FOPTIONAL=5FLOCKS=3D=30=20in=20all=20cases?= In-Reply-To: <20180925122309.GB68323@aeruder.net> References: <87wpvebraz.fsf@smart-cactus.org> <20180925122309.GB68323@aeruder.net> Message-ID: <6897dc085833cb91cc3408e1d7154b38@webmail.orcon.net.nz> X-Sender: psainty@orcon.net.nz User-Agent: Orcon Webmail X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, alexei.khlebnikov@gmail.com, michael.albinus@gmx.de, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2018-09-26 00:23, Andrew Ruder wrote: > Please see attached patch. There is also some early reports of > success at https://github.com/magit/magit/issues/2708 Just to reiterate my comments from there, I believe this new patch does indeed resolve this bug. I've been using Emacs 26.1 with the earlier patch applied: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21559#131 And git version 2.16.3 With that, I was very regularly encountering the error "Unable to create '.git/index.lock': File exists." when rebasing in Magit with global-auto-revert-mode enabled. With this new patch applied too, I am not seeing the error at all. For testing I repeatedly rebased a moderately large branch, with and without the new patch (3 times each). Without the new patch I was encountering "Unable to create '.git/index.lock': File exists." between 3 and 5 times during each rebase. With the new patch I didn't encounter the problem at all in any of the rebases. -Phil From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 26 05:46:00 2018 Received: (at 21559) by debbugs.gnu.org; 26 Sep 2018 09:46:00 +0000 Received: from localhost ([127.0.0.1]:54425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g56OO-0000E6-3p for submit@debbugs.gnu.org; Wed, 26 Sep 2018 05:46:00 -0400 Received: from mout.gmx.net ([212.227.15.18]:40709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g56OL-00008M-UD for 21559@debbugs.gnu.org; Wed, 26 Sep 2018 05:45:58 -0400 Received: from detlef.gmx.de ([212.86.60.15]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfF6I-1gOH8e1hZy-00On8N; Wed, 26 Sep 2018 11:45:42 +0200 Received: from detlef.gmx.de ([212.86.60.15]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfF6I-1gOH8e1hZy-00On8N; Wed, 26 Sep 2018 11:45:42 +0200 From: Michael Albinus To: Phil Sainty Subject: Re: bug#21559: additional patch needed to set GIT_OPTIONAL_LOCKS=0 in all cases References: <87wpvebraz.fsf@smart-cactus.org> <20180925122309.GB68323@aeruder.net> <6897dc085833cb91cc3408e1d7154b38@webmail.orcon.net.nz> Date: Wed, 26 Sep 2018 11:45:40 +0200 In-Reply-To: <6897dc085833cb91cc3408e1d7154b38@webmail.orcon.net.nz> (Phil Sainty's message of "Wed, 26 Sep 2018 15:16:50 +1200") Message-ID: <87ftxw618b.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:zmaMOsNeTkAoFcWeYQyQDm58ZkzRtem+vnGP5ziazfsQ1XevjEA gfDKYRVc66gSza4TO/tZsfl3ID6eWwQjxuT338JjjOB/xL2Q1unvwaX6kP8Q0uzfjpqnjf3 RigPOr4qaC7yon8eLkWX3CES9gi+7soCkuuIEkDWan/rH7Nz/LfByLFk3iQyWB3oWAzikNU 4sAdC+HyrUbiKIFxlZgqg== X-UI-Out-Filterresults: notjunk:1;V01:K0:QUmK8w1qIuU=:BupE4XfSoTcQWWpWCRKJrF dB8ZJT02MIeAvad2J/9zz6IuEIkEBQErWoEQ/jMI9FWmYlOJBm4uE9JaETUSDLq8j9RZemxay X7kfZGs1XnsfwFIAcIddRpqiPDQr78sI3C76AF8j0sPFzGNFfuIu2cJkHXp/goUalQQGzsDup Mibfj9zY2a0lX32Y40+cZdCmhexU1WW3cxBoArdKshzHg0wqxjlqkahWjJu3nXWWPdTrzGtOk g1WdzJIwZsYr2kRTV2lJ63+MWBeiAGonl7cRYGpoyA/AdEFS5Bqlpu7diP8I9pXCQXXw0UQWg u3DXCxqNONcA6twNstMCykMgPRamtj1d7IVJHQkS8Uqcsqe693itEa7iK8yxLjriH3a2IBZLo urpDLkwzFxByRoCKg/iw9Ea33F28QBgTTgQTClQG8VdDhHEerqOzTk4+lTj1uZg5oUEwxwSNg KCD/qpJvp/9XMe4Ob7lKVLMMmFGViASDpCguASC3ifnx1lg4f2OD7WINwwtJBgD/ZZwY26ZfE wDWgXDoKy/fpa+k6uZ1Ka60WNp8064gfMAVUeYoUUcg9nBZ/tiRXR22bEbJ+Vl1tYL5fv9IlF fignhi0JFAEyuSBw8Rv1a5bylLO3tGmXA9Jg7qZEAi3M/4Ryj0zsy4ammzUy8BTcZ17CO/Kii MJDWnSPLE0uPLqnoSUj9vKQvVrCkZRKRJ98tRiUln2mvYACGjnAC+OnbBeMp7CaFO0R13YoZp gGthLgS9AYwjeSkQ7q+IZaPhIMFgXZTtDIJh64Tf5+ZqRah1l6iS8/LPVPDPuSytUthK5GzQV hVp54YP9qi8VaUDoAge7gXf+mDgfjPTGP5OrjUB7X0H9pk1t9s= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559 Cc: 21559@debbugs.gnu.org, alexei.khlebnikov@gmail.com, Andrew Ruder , dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Phil Sainty writes: > On 2018-09-26 00:23, Andrew Ruder wrote: >> Please see attached patch. There is also some early reports of >> success at https://github.com/magit/magit/issues/2708 > > Just to reiterate my comments from there, I believe this new patch > does indeed resolve this bug. It looks also good to me. If nobody opposes, I'll commit it next days. > -Phil Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 29 07:16:51 2018 Received: (at 21559-done) by debbugs.gnu.org; 29 Sep 2018 11:16:51 +0000 Received: from localhost ([127.0.0.1]:58338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6DEx-0001lE-66 for submit@debbugs.gnu.org; Sat, 29 Sep 2018 07:16:51 -0400 Received: from mout.gmx.net ([212.227.15.19]:60197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6DEv-0001l1-CK for 21559-done@debbugs.gnu.org; Sat, 29 Sep 2018 07:16:49 -0400 Received: from detlef.gmx.de ([212.86.46.204]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mdren-1gOXKm0sIf-00Pc8Q; Sat, 29 Sep 2018 13:16:33 +0200 Received: from detlef.gmx.de ([212.86.46.204]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mdren-1gOXKm0sIf-00Pc8Q; Sat, 29 Sep 2018 13:16:33 +0200 From: Michael Albinus To: Phil Sainty Subject: Re: bug#21559: additional patch needed to set GIT_OPTIONAL_LOCKS=0 in all cases References: <87wpvebraz.fsf@smart-cactus.org> <20180925122309.GB68323@aeruder.net> <6897dc085833cb91cc3408e1d7154b38@webmail.orcon.net.nz> <87ftxw618b.fsf@gmx.de> Date: Sat, 29 Sep 2018 13:16:30 +0200 In-Reply-To: <87ftxw618b.fsf@gmx.de> (Michael Albinus's message of "Wed, 26 Sep 2018 11:45:40 +0200") Message-ID: <87r2hcmu41.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:VZRvJKbuPIagzQ5exV7VowG5qEtrT4sA4BbNQN7vKYS2ao+z1VH 6e2c5UELnxqqs34P+e05QLBfbYlneHzo0DxrD0okyczOJI/JpnWPcg22F4474CYbg82jPho jDilo5Rs8zHnj1EyQRzlWd+pR5CsKsfa8UpdeuMg8gpqb7EZgWEdfVpudATgmd22irk9MBs OC2izX9gbKtsqjXMF0ypw== X-UI-Out-Filterresults: notjunk:1;V01:K0:n9I6dfqUqJI=:LGLDpmWj+gA2p7TPye0Xaz Y8Wx1ZIU0jUxb7PbmIY1qIX1R/Yri2TrNVGS8AHWK7sVaxH8I1GLP4qy0632F1yku5kujgnwP xYEoa3ZU6EZV6K0PLqUb8KLkGaqvgnO1b1ZjzZ/sHw3ATEXR4L0DW6l+cfBtE/ZobJdYLroHm ldPuNkp4PuXZj6nPcmHcJ0Kc+BDHCIzi2bbfE9VSSzrxqJ0qTKkTalhgufQSJ4rgiKo2RGL0y rcGxVl1EI2bRLXzNX7mbFhU/w483nMLtiBDslCqfxZpqYelRbwCUxV6Z59Z7O+azeDzEFFznz p5HIrUCKJ8CPob9HjMMl1CfJaurq4CRwLtTfzQq0bHFjowA2oyYnenVTBBak6Ub8jwdiYhUTZ 1ibskH8gGmaDUOsNeis7uDXYgFr146RsCzJwQbFy7n+3UCsbMapUSPf0ePJzgxB806KNmn+aw ifCYk73h6TkYUFMdej8u6SnGGG6RQ1w9yYpxBSjoyDlTl9TrpfY3dlFAS40MuNtzToSiNPJMI EXEOgCGL3PuYbJgAGj9mW43/Ll5Dq0eJ5UMBXJPJGwKo++t6Gi3N/1owtnw4ypy/49n7d2O1t KCecscDV1axaHYTI+x87olwBhsKk5DIBOKVS29TAKJKTpZVPuGvT3chAW92sJ4QTQx4XPfJjC YbV+3XSAijZEXy3VFrYw1nayLYqdWRzRKl+4yPHl62o2xL1WK6ei/gCOA/xURRI9RbcVf5CC2 0TndLG57ZWobYL6BTZVlMyGP/i/zcKT+e26liYWfHqkqYHER2nrD9M7f9oBrN54Bt3ZQzwLJP qS3f5nwnOlplnipnHPq/8xzDpeKWv8BUuAbrjsGD/VI41AYLvo= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21559-done Cc: alexei.khlebnikov@gmail.com, 21559-done@debbugs.gnu.org, Andrew Ruder , dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 27.1 > It looks also good to me. If nobody opposes, I'll commit it next days. Pushed to master. I'm closing the bug. Best regards, Michael. From unknown Fri Aug 15 15:34:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Oct 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator