From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#39044: 27.0.50; On git log-view-diff does not work for moved files. Date: Fri, 15 Dec 2023 22:48:08 +0200 Message-ID: <7559221a-e7a2-4a75-11cf-b29769b4874f@gutov.dev> References: <9961b9c6-e39b-d6f9-5d5b-a0e3de5b12c7@yandex.ru> <82fa7939-8914-0dd4-ef6c-e3d100aa1dc6@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30418"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: David Koppelman , 39044-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 15 21:49:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rEF7c-0007aV-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 21:49:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEF7M-00070B-DT; Fri, 15 Dec 2023 15:49:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEF7G-0006zS-RL for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:49:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rEF7G-0000va-5T for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rEF7G-0000Uk-7Q for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 15:49:02 -0500 Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 20:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 39044 X-GNU-PR-Package: emacs Mail-Followup-To: 39044@debbugs.gnu.org, dmitry@gutov.dev, koppel@ece.lsu.edu Original-Received: via spool by 39044-done@debbugs.gnu.org id=D39044.17026732991680 (code D ref 39044); Fri, 15 Dec 2023 20:49:02 +0000 Original-Received: (at 39044-done) by debbugs.gnu.org; 15 Dec 2023 20:48:19 +0000 Original-Received: from localhost ([127.0.0.1]:53625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEF6Z-0000Qy-23 for submit@debbugs.gnu.org; Fri, 15 Dec 2023 15:48:19 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:35477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEF6X-0000QB-60 for 39044-done@debbugs.gnu.org; Fri, 15 Dec 2023 15:48:17 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A03925C01DE; Fri, 15 Dec 2023 15:48:11 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 15 Dec 2023 15:48:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1702673291; x=1702759691; bh=EvEnGbsaLchMgHJh1U7OIpeYamfH7VfN1ndZkWg+6tU=; b= DLA/VafDJINQP/hHOmJBhWmSRa+pyyafACY82V4ZtE9iW0TVY3WPaJVLqoSKJvnz mqNwQHWfU8C8PgVZn+4+Wpyfw9tn2vn1cBeLWpTQkgAlgeNDRfu9pjGzan+2awAq 3AU882Lgu5HTbJrYFQ+nmAOqeuM9qO2Tw4mxfwdsi9chKEyg5EgWk56C/Xklconp tGZZY9Pd1emvixSj1y47XAswjSH9Kvts2zOmFkHcPC4QeuT8ITENBoYp4FKpSzFl uGNIpyq1vvVCUiLZcpTohP+7aPqMRYGETHMk96fbVvjiMtjSpI3FBY1Hfz+/i/kM BN23hEiHgdMTsFhxGxtnmA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1702673291; x= 1702759691; bh=EvEnGbsaLchMgHJh1U7OIpeYamfH7VfN1ndZkWg+6tU=; b=S MlXDjtTCvwpRHDA5ssW1iLdNe8vZ20DVYyGaQlHyRbDvabiTbcyNDDBcJFrr01In i7AAXlEu6+rztlV+s9hYukvh0N2hvivQ/ikuKDO4nUmFZad+xOgZpFeFGehjBsrK eUxtdilAhX86/pD0+Z2/Sd1FIQmgV4S7Q6MVh5Tiz3pRphpwM5m4ti/4oq5g8PvZ uxW4w3XtXBEtT6PYq9c5QHvYKu1IaYRv9o74njyLJ5ffhSHjiWEZEghVIMb4PlKR hwJJVM7GYXaUGN2rIaLCKy/8vSrPDgjoSqPpN+lt5dC/koSdrvHzyXxJX0ojYiiy /h6PgMfDKjqyv4cDDWf2Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtvddgudeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuhffvfhgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepudetteelteekgeevieeludevkeelffeluedvtdeggfeitdejledtieekheei gefgnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Dec 2023 15:48:10 -0500 (EST) Content-Language: en-US In-Reply-To: <82fa7939-8914-0dd4-ef6c-e3d100aa1dc6@gutov.dev> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:276289 Archived-At: Version: 30.1 On 14/12/2023 03:23, Dmitry Gutov wrote: > On 13/05/2020 04:36, Dmitry Gutov wrote: >> On 08.01.2020 22:48, David Koppelman wrote: >>> >>> With (setq vc-git-print-log-follow t) visit a file in a git repo that >>> was moved from some other directory and which had changes when in that >>> other directory. Start log view, C-x v =, move the cursor to a commit >>> made in the file's former location, and press d (log-view-diff). Rather >>> than showing a diff, a message reporting no changes is shown. >> >> I usually give up and press 'D' in those cases (diff for the whole tree). >> >>> This flaw was noted in bug 8756, covering vc-diff/log-view, but was >>> left to a follow on bug. >>> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756). >>> >>> Interestingly, vc-annotate has no trouble with renames. See >>> commit d1e4c4037e88f3256db19813805d03f8ad0291fa. >> >> vc-annotate is fine because 'git blame' includes the previous file >> name in the output. Not so for 'git log' by default. >> >> Looking at this issue for some time, I haven't found an easier way to >> do this rather than: >> >> 1. When vc-git-print-log-follow=t, also add the --name-status argument >> to the command invocation. >> >> 2. Hide this new text from the user using font lock by adding some >> rules to vc-git-log-view-mode. >> >> 3. _Probably_ teach log-view-current-file how to determine the current >> file name. _Maybe_ via log-view-file-re. Some come would also need to >> set log-view-per-file-logs to t for per-file Git logs. It could also >> be made into a backend method instead. >> >> See also bug#13004 for the same problem when using Hg. It could use >> the same approach, but the solution is more questionable since >> '--stat' seems to noticeably slow it down. > > I have now posted a somewhat related solution to > https://debbugs.gnu.org/55871#41. > > Except it requires vc-git-print-log-follow to be disabled, and has > virtually no runtime overhead. And it works when a fileset contains > several files, not just for singles (a rare case, though). > > Feedback welcome. > > And maybe these bug reports should be merged, actually, since the > complaint is more or less the same. Feedback is still welcome, but I have now pushed a revised version to master (5b80894d0a7), so marking this as resolved.