From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19045: 25.0.50; [PATCH] vc-git-print-log use --follow Date: Sat, 10 Feb 2018 23:08:32 +0200 Organization: LINKOV.NET Message-ID: <87lgg0sgbz.fsf@mail.linkov.net> References: <87d28rt4jl.fsf@telefonica.net> <874lmxloo1.fsf@mail.linkov.net> <83fu692jdu.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1518297150 19646 195.159.176.226 (10 Feb 2018 21:12:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Feb 2018 21:12:30 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 19045@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 10 22:12:25 2018 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 1ekcRL-0003ip-7R for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Feb 2018 22:12:07 +0100 Original-Received: from localhost ([::1]:34755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekcTM-00016A-BV for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Feb 2018 16:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekcTF-00015p-Vh for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 16:14:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekcTC-0003cg-GW for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 16:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekcTC-0003bZ-BU for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 16:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ekcTB-000442-WD for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2018 16:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2018 21:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19045 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19045-submit@debbugs.gnu.org id=B19045.151829718615551 (code B ref 19045); Sat, 10 Feb 2018 21:14:01 +0000 Original-Received: (at 19045) by debbugs.gnu.org; 10 Feb 2018 21:13:06 +0000 Original-Received: from localhost ([127.0.0.1]:37274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekcSI-00042l-AX for submit@debbugs.gnu.org; Sat, 10 Feb 2018 16:13:06 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:35286 helo=homiemail-a101.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekcSG-00042d-K7 for 19045@debbugs.gnu.org; Sat, 10 Feb 2018 16:13:05 -0500 Original-Received: from homiemail-a101.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTP id CC642117E06C; Sat, 10 Feb 2018 13:13:03 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-100-74.cust.tele2.ee [91.129.100.74]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a101.g.dreamhost.com (Postfix) with ESMTPSA id E805B117E06A; Sat, 10 Feb 2018 13:13:02 -0800 (PST) In-Reply-To: <83fu692jdu.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2018 13:07:09 +0200") 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:143108 Archived-At: >> @@ -1019,8 +1019,9 @@ If LIMIT is non-nil, show no more than this many= entries." >> (append >> '("log" "--no-color") >> (when (and vc-git-print-log-follow >> - (not (cl-some #'file-directory-p files))) >> - ;; "--follow" on directories is broken >> + (null (cdr files)) >> + (not (file-directory-p (car files)))) >> + ;; "--follow" on directories or multiple files is b= roken >> ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D= 8756 >> ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D= 16422 >> (list "--follow")) > > What does this mean "is broken" in this context? Is this a Git > bug/misfeature, or is that vc-git.el problem? I cannot figure out the > answer by reading the cited bug reports. > > And the doc string doesn't sound detailed enough to me, as it doesn't > tell enough about the commands that are affected. When the argument =E2=80=98files=E2=80=99 contains more than one file, th= en git fails with the same error as when =E2=80=98files=E2=80=99 contains a directory = (the case that was previously handled by =E2=80=98cl-some #'file-directory-p=E2=80=99= above). The detailed recipe for the previous version of vc-git.el is here: 0. emacs -Q 1. C-x d directory_under_Git_control 2. use customization or just (setq vc-git-print-log-follow t) 3. in Dired mark only one file 4. C-x v l - works ok showing the log 5. mark a second file, so there are 2 marked files in Dired 6. C-x v l - git fails with the following error message: =E2=80=9Cusage: git logs can only follow renames on one pathname at a t= ime=E2=80=9D in git version 1.9.1 So the fix was to check whether there is only one file given as an argume= nt, and it is not a directory.