From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jason Merrill Newsgroups: gmane.emacs.bugs Subject: bug#21559: 25.0.50; auto-revert-mode breaks git rebase Date: Fri, 9 Sep 2016 16:56:23 -0400 Message-ID: References: <87wpvebraz.fsf@smart-cactus.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134fcba41c498053c1962a4 X-Trace: blaine.gmane.org 1473455658 25601 195.159.176.226 (9 Sep 2016 21:14:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Sep 2016 21:14:18 +0000 (UTC) To: 21559@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 23:14:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biT7l-0005wI-57 for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 23:14:13 +0200 Original-Received: from localhost ([::1]:60287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biT7l-0008Oa-3C for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 17:14:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biT7d-0008Mx-6x for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 17:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biT7Z-0005be-UG for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 17:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biT7Z-0005ba-R5 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 17:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1biT7Z-0001Y2-M5 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 17:14:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87wpvebraz.fsf@smart-cactus.org> Resent-From: Jason Merrill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2016 21:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21559 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21559-submit@debbugs.gnu.org id=B21559.14734555855870 (code B ref 21559); Fri, 09 Sep 2016 21:14:01 +0000 Original-Received: (at 21559) by debbugs.gnu.org; 9 Sep 2016 21:13:05 +0000 Original-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 Original-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 Original-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) Original-Received: by 10.36.203.194 with HTTP; Fri, 9 Sep 2016 13:56:23 -0700 (PDT) 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123127 Archived-At: --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--