From unknown Sun Jun 15 08:38:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39044: 27.0.50; On git log-view-diff does not work for moved files. Resent-From: David Koppelman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jan 2020 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39044 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 39044@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15785171724695 (code B ref -1); Wed, 08 Jan 2020 21:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Jan 2020 20:59:32 +0000 Received: from localhost ([127.0.0.1]:51385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipIQK-0001DR-Kk for submit@debbugs.gnu.org; Wed, 08 Jan 2020 15:59:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:34315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipIQE-0001D7-PZ for submit@debbugs.gnu.org; Wed, 08 Jan 2020 15:59:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipIQA-0000SL-QF for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:22 -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.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipIQ6-0006yZ-5V for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:17 -0500 Received: from mail.ece.lsu.edu ([130.39.222.15]:38288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ipIQ5-0006or-U8 for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:14 -0500 Received: from cyc.ece.lsu.edu (cyc.ece.lsu.edu [96.125.115.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.ece.lsu.edu (Postfix) with ESMTPS id 32CC0211C69FA for ; Wed, 8 Jan 2020 14:48:45 -0600 (CST) From: David Koppelman Date: Wed, 08 Jan 2020 14:48:45 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 130.39.222.15 X-Spam-Score: -2.3 (--) 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: -3.3 (---) 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. 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. In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-12-20 built on cyc.ece.lsu.edu Repository revision: 85a60da92d4db5c87ecfa152501d246425550fc3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Scientific Linux 7.7 (Nitrogen) Configured using: 'configure CFLAGS=-O3 --without-pop' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LC_COLLATE: C value of $LC_TIME: C value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: log Minor modes in effect: shell-dirtrack-mode: t global-hi-lock-mode: t hi-lock-mode: t which-function-mode: t flyspell-mode: t tooltip-mode: t global-eldoc-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow emacsbug smerge-mode diff whitespace bug-reference vc-annotate log-view pcvs-util vc vc-dispatcher vc-git diff-mode mhtml-mode css-mode smie eww mm-url url-queue js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode p-viewer misearch multi-isearch bbdb-gui flow-fill gnus-uu yenc mailalias smtpmail sendmail nnir shr-color color sort gnus-cite smiley mm-archive gnus-async gnus-bcklg qp cl-extra gnus-ml disp-table gnus-topic utf-7 gnutls network-stream nsm imap rfc2104 nndoc nndraft nnmh nnmbox bbdb-gnus bbdb-snarf mail-extr bbdb-com gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit add-log help-mode mule-util cal-move p-iimage easy-mmode simtools p-tex-funcs shell pcomplete comint ring man ansi-color hi-lock p-stop-time time-stamp dired-aux p-page dabbrev ps-print ps-print-loaddefs ps-def lpr holidays hol-loaddefs appt p-diary-aux cal-x p-diary-audit diary-lib diary-loaddefs cal-menu calendar cal-loaddefs paren mic-paren message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader ffap thingatpt ccl-mode ampl-mode bbdb-autoloads bbdb timezone texize chemora-mode which-func imenu flyspell ispell gnuplot-mode edmacro kmacro p-autoreload derived sd image-file advice package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 321268 49388) (symbols 48 28911 1) (strings 32 92367 7980) (string-bytes 1 3634829) (vectors 16 47078) (vector-slots 8 1360945 151650) (floats 8 775 1958) (intervals 56 11966 7520) (buffers 1000 79) (heap 1024 59319 13646)) From unknown Sun Jun 15 08:38:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39044: 27.0.50; On git log-view-diff does not work for moved files. Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 May 2020 01:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39044 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Koppelman , 39044@debbugs.gnu.org Received: via spool by 39044-submit@debbugs.gnu.org id=B39044.15893338211416 (code B ref 39044); Wed, 13 May 2020 01:37:02 +0000 Received: (at 39044) by debbugs.gnu.org; 13 May 2020 01:37:01 +0000 Received: from localhost ([127.0.0.1]:56973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYgKF-0000MX-Hz for submit@debbugs.gnu.org; Tue, 12 May 2020 21:37:01 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYgKD-0000MK-LH for 39044@debbugs.gnu.org; Tue, 12 May 2020 21:36:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id s8so18674986wrt.9 for <39044@debbugs.gnu.org>; Tue, 12 May 2020 18:36:45 -0700 (PDT) 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=tbvaCvUra1cmZeXZ2cLoZj2/AB8aL55W+Mr87esQWVA=; b=K2FY8SIJlKPr1liu46dRUnkyqNiCuP8JPT5GaY9zwkvptuKuUvj34VtLTAp/qpapaY XL6k2bb2PLdUeUUrsdwADklGucZ5A/nAOwRGm3uOzsPLq+TG3Htjh5RUxQSyZgSbCr2V Z0/wzqmlPG0QyyxI/6MqT+ee5IV1T8ay8kHa7i6SG/22PJ85TqNN26QQeHkXpQl4ZYe5 o/dkkO6izgXHcPjWfiwvPyV18BoyOAfWA9WL9vYmbqx8PE1UmNFvd8uxcA3tkoi+Ivl4 m3gOt49Qsv6S597IOrPG6qcoWUUDi/DAe6/ejzuP2plRXrmi1vFVio5lY8OQYpDKHydD FOnQ== 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=tbvaCvUra1cmZeXZ2cLoZj2/AB8aL55W+Mr87esQWVA=; b=dptSfsWOQDsTKmj342ylL5U5SPghCx7mya6YqxLc6i6FdQfidasbsusyQdLmV6OhdA YG4SGsHfwsKPrXOAcMu0MPkeoJXzohoS9hiWLmpNZp65eGtxL65CtveAfDgCAycIbHI8 F+ReakGFa4UpOzloPlVUhQm4WuzTPIVA+nrYmbYkiKFp9oJPsjOydmm3UTOjb3qfqXph M0T8j7EWBP/uHq8NkCdsIdK66il0FANZ52biR4/cSETs3JbgiUHjjTkiXn03Lem5fSd/ 13KzcSXdMSy55yj/5JJaGmA0Zl3SzYnYDYRfbjtqYAyDKhqb9mdQMtjtbDxrk1e8i6MJ b+bg== X-Gm-Message-State: AGi0PubND1VRgb8ys+tEztIa9FmkkYobqc2EUiQ+TEhWzEamh3/DK6bu SXJDl5Bs2gzbAFqKeCcXhfDqi7oQ X-Google-Smtp-Source: APiQypJQhOx5VqIsE2B2p5QAxztcCYTSufBSTnDMGONub0Ozlreo87NxLIsJsmcENetO5MLz5hoxJQ== X-Received: by 2002:a5d:6b90:: with SMTP id n16mr10235307wrx.220.1589333799398; Tue, 12 May 2020 18:36:39 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id k131sm1275785wma.2.2020.05.12.18.36.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 May 2020 18:36:38 -0700 (PDT) References: From: Dmitry Gutov Message-ID: <9961b9c6-e39b-d6f9-5d5b-a0e3de5b12c7@yandex.ru> Date: Wed, 13 May 2020 04:36:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.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-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 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. From unknown Sun Jun 15 08:38:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#39044: 27.0.50; On git log-view-diff does not work for moved files. Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Dec 2023 01:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39044 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Koppelman , 39044@debbugs.gnu.org Received: via spool by 39044-submit@debbugs.gnu.org id=B39044.17025170433371 (code B ref 39044); Thu, 14 Dec 2023 01:25:02 +0000 Received: (at 39044) by debbugs.gnu.org; 14 Dec 2023 01:24:03 +0000 Received: from localhost ([127.0.0.1]:59922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDaSJ-0000sJ-E8 for submit@debbugs.gnu.org; Wed, 13 Dec 2023 20:24:03 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDaSG-0000rg-KA for 39044@debbugs.gnu.org; Wed, 13 Dec 2023 20:24:02 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5ADFC5C0337; Wed, 13 Dec 2023 20:23:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 13 Dec 2023 20:23:38 -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=1702517018; x=1702603418; bh=zzkgi9DeF4ZrAxp89gmHlCyyg7WfQwzqVMFAir0tNn4=; b= 1IRgctcgSEqXW7BAJGSfineYO2BaAOqqXaglJkXfTUIX326e8FASIwJOlkK+S7cp +O3mx8hmNpuQQQpJ9mtaq577Ud/wW0MLszt3ctX0knZITlmx4TkPLiDqY7eoVJTH eBMqIoPYogIrl9ljqI9SqS7we21jr2+4Ykp4jkrFQ7S2mEf9dNfsK+rPryXezp9d R1iBxCNojB2dFbGl0fWq3DyAAjb0p/+K8qMTP0Jz3aVbPtlPL1I7chXhJ8vj4CBu WFeY/z454frx3g5KaYisARvBr+1t0XbD3u7K/Ve3HkPRzG8AuJVzzRyRJqCwmBk5 Ccnabr7x9iHpYJDHEoB4KA== 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=fm1; t=1702517018; x= 1702603418; bh=zzkgi9DeF4ZrAxp89gmHlCyyg7WfQwzqVMFAir0tNn4=; b=h nAxzr/sW/58FVc2VOjS3GwaEmfUGlma35B/3NxOTdgLN1aF0n9Eyqr5M1moG0Fpz aGl0OmyNKeVeJnDn4Dvmloi4XC2ivFJ4v1YHV5iKdOnhbER2Y+zgmOS10a8CsVWk MrKLhj5rkGN6S+y3MXzdCwSSK+EqqaeXNvWemcwkNz8KbEhL4HPk0iEj3nwHK+qA EX8LEgE+BQlh32EEs7UDA/BudjUSYmmhxmXcHcKwGVICWsA4UVbuymkypc9AkNes 3yLn73julTwkmlnSKY6UcRxrdE6/bdLUriQPvxzcEHbZd18g++AEH0T3WNKAmF8O 4WZ05OTaEb+OQQdIqloQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudelkedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfhfjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeduteetleetkeegveeileduveekleffleeuvddtgefgiedtjeeltdeikeehieeg gfenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Dec 2023 20:23:37 -0500 (EST) Message-ID: <82fa7939-8914-0dd4-ef6c-e3d100aa1dc6@gutov.dev> Date: Thu, 14 Dec 2023 03:23:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US From: Dmitry Gutov References: <9961b9c6-e39b-d6f9-5d5b-a0e3de5b12c7@yandex.ru> In-Reply-To: <9961b9c6-e39b-d6f9-5d5b-a0e3de5b12c7@yandex.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) 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: -3.9 (---) 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. From unknown Sun Jun 15 08:38:42 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: David Koppelman Subject: bug#39044: closed (Re: bug#39044: 27.0.50; On git log-view-diff does not work for moved files.) Message-ID: References: <7559221a-e7a2-4a75-11cf-b29769b4874f@gutov.dev> X-Gnu-PR-Message: they-closed 39044 X-Gnu-PR-Package: emacs Reply-To: 39044@debbugs.gnu.org Date: Fri, 15 Dec 2023 20:49:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1702673342-1897-1" This is a multi-part message in MIME format... ------------=_1702673342-1897-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39044: 27.0.50; On git log-view-diff does not work for moved files. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39044@debbugs.gnu.org. --=20 39044: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39044 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1702673342-1897-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39044-done) by debbugs.gnu.org; 15 Dec 2023 20:48:19 +0000 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 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 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) 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 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Dec 2023 15:48:10 -0500 (EST) Message-ID: <7559221a-e7a2-4a75-11cf-b29769b4874f@gutov.dev> Date: Fri, 15 Dec 2023 22:48:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#39044: 27.0.50; On git log-view-diff does not work for moved files. Content-Language: en-US From: Dmitry Gutov To: David Koppelman , 39044-done@debbugs.gnu.org References: <9961b9c6-e39b-d6f9-5d5b-a0e3de5b12c7@yandex.ru> <82fa7939-8914-0dd4-ef6c-e3d100aa1dc6@gutov.dev> In-Reply-To: <82fa7939-8914-0dd4-ef6c-e3d100aa1dc6@gutov.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 39044-done 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: -2.4 (--) 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. ------------=_1702673342-1897-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Jan 2020 20:59:32 +0000 Received: from localhost ([127.0.0.1]:51385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipIQK-0001DR-Kk for submit@debbugs.gnu.org; Wed, 08 Jan 2020 15:59:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:34315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ipIQE-0001D7-PZ for submit@debbugs.gnu.org; Wed, 08 Jan 2020 15:59:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40858) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipIQA-0000SL-QF for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:22 -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.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipIQ6-0006yZ-5V for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:17 -0500 Received: from mail.ece.lsu.edu ([130.39.222.15]:38288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ipIQ5-0006or-U8 for bug-gnu-emacs@gnu.org; Wed, 08 Jan 2020 15:59:14 -0500 Received: from cyc.ece.lsu.edu (cyc.ece.lsu.edu [96.125.115.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.ece.lsu.edu (Postfix) with ESMTPS id 32CC0211C69FA for ; Wed, 8 Jan 2020 14:48:45 -0600 (CST) From: David Koppelman To: bug-gnu-emacs@gnu.org Subject: 27.0.50; On git log-view-diff does not work for moved files. Date: Wed, 08 Jan 2020 14:48:45 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 130.39.222.15 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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: -3.3 (---) 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. 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. In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-12-20 built on cyc.ece.lsu.edu Repository revision: 85a60da92d4db5c87ecfa152501d246425550fc3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Scientific Linux 7.7 (Nitrogen) Configured using: 'configure CFLAGS=-O3 --without-pop' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LC_COLLATE: C value of $LC_TIME: C value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix Major mode: log Minor modes in effect: shell-dirtrack-mode: t global-hi-lock-mode: t hi-lock-mode: t which-function-mode: t flyspell-mode: t tooltip-mode: t global-eldoc-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 column-number-mode: t line-number-mode: t transient-mark-mode: t Features: (shadow emacsbug smerge-mode diff whitespace bug-reference vc-annotate log-view pcvs-util vc vc-dispatcher vc-git diff-mode mhtml-mode css-mode smie eww mm-url url-queue js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode p-viewer misearch multi-isearch bbdb-gui flow-fill gnus-uu yenc mailalias smtpmail sendmail nnir shr-color color sort gnus-cite smiley mm-archive gnus-async gnus-bcklg qp cl-extra gnus-ml disp-table gnus-topic utf-7 gnutls network-stream nsm imap rfc2104 nndoc nndraft nnmh nnmbox bbdb-gnus bbdb-snarf mail-extr bbdb-com gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit add-log help-mode mule-util cal-move p-iimage easy-mmode simtools p-tex-funcs shell pcomplete comint ring man ansi-color hi-lock p-stop-time time-stamp dired-aux p-page dabbrev ps-print ps-print-loaddefs ps-def lpr holidays hol-loaddefs appt p-diary-aux cal-x p-diary-audit diary-lib diary-loaddefs cal-menu calendar cal-loaddefs paren mic-paren message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader ffap thingatpt ccl-mode ampl-mode bbdb-autoloads bbdb timezone texize chemora-mode which-func imenu flyspell ispell gnuplot-mode edmacro kmacro p-autoreload derived sd image-file advice package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 321268 49388) (symbols 48 28911 1) (strings 32 92367 7980) (string-bytes 1 3634829) (vectors 16 47078) (vector-slots 8 1360945 151650) (floats 8 775 1958) (intervals 56 11966 7520) (buffers 1000 79) (heap 1024 59319 13646)) ------------=_1702673342-1897-1--