threads / bug / 53578

[BUG] New git unable to show this commit completely?

Subject: [BUG] New git unable to show this commit completely?

## tl;dr

3 messages between May 29, 2020 and May 29, 2020.

replies: 2people: 2as markdown or json

Dexuan Cui· May 29, 2020, 05:43 UTC · lore

Hi, In CentOS 7.8, git 1.8.3.1 can show this commit from the mainline Linux kernel correctly:

[decui@localhost linus.git]$ git --version git version 1.8.3.1

[decui@localhost linus.git]$ git show --stat 7b38725318f4517af6168ccbff99060d67aba1c8
commit 7b38725318f4517af6168ccbff99060d67aba1c8
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 19:11:44 2009 +0100
    x86: remove subarchitecture support code
    Remove remaining bits of the subarchitecture code. Now that all the
    special platforms are runtime probed and runtime handled, we can remove
    these facilities.
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
 arch/x86/Makefile              |   5 --
 arch/x86/kernel/Makefile       |   2 +-
 arch/x86/kernel/probe_32.c     | 248 +++++++++++++++++++++++++++++++++++++++
 arch/x86/mach-generic/Makefile |   7 ---
 arch/x86/mach-generic/probe.c  | 156 ---------------------------------------
 5 files changed, 249 insertions(+), 169 deletions(-)

However, in Ubuntu 20.04, the git doesn't show the deleted file arch/x86/mach-generic/probe.c at all:

root@decui-u2004:~/linux# git --version git version 2.25.1

root@decui-u2004:~/linux# git show --stat 7b38725318f4517af6168ccbff99060d67aba1c8
commit 7b38725318f4517af6168ccbff99060d67aba1c8
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Jan 28 19:11:44 2009 +0100
    x86: remove subarchitecture support code
    Remove remaining bits of the subarchitecture code. Now that all the
    special platforms are runtime probed and runtime handled, we can remove
    these facilities.
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
 arch/x86/Makefile                                    |  5 ----
 arch/x86/kernel/Makefile                             |  2 +-
 arch/x86/{mach-generic/probe.c => kernel/probe_32.c} | 92 ++++++++++++++++++
 arch/x86/mach-generic/Makefile                       |  7 -----
 4 files changed, 93 insertions(+), 13 deletions(-)

I tried the latest git release git-2.26.2.tar.gz from kernel.org, and it also has the same issue.

The web interface has the same issue too: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7b38725318f4517af6168ccbff99060d67aba1c8

It looks there is a bug introduced in some git verson newer than 1.8.3.1?

Thanks, -- Dexuan

Jeff King· May 29, 2020, 05:50 UTC · re: Dexuan Cui · lore

Re: [BUG] New git unable to show this commit completely?

On Fri, May 29, 2020 at 05:43:29AM +0000, Dexuan Cui wrote:
> However, in Ubuntu 20.04, the git doesn't show the deleted file
> arch/x86/mach-generic/probe.c at all:
It does; it's part of this rename:
>  arch/x86/{mach-generic/probe.c => kernel/probe_32.c} | 92 ++++++++++++++++++

Rename detection was turned on by default in Git v2.0. You can get the original output with:

  git show --stat --no-renames 7b38725318f4517af6168ccbff99060d67aba1c8

Or if you really don't like rename detection, you can disable it in the config, like:

  git config --global diff.renames false
-Peff
Dexuan Cui· May 29, 2020, 06:16 UTC · re: Jeff King · lore

RE: [BUG] New git unable to show this commit completely?

Show 16 quoted lines
> From: Jeff King <peff@peff.net>
> Sent: Thursday, May 28, 2020 10:51 PM
> Cc: git@vger.kernel.org
> Subject: Re: [BUG] New git unable to show this commit completely?
> 
> On Fri, May 29, 2020 at 05:43:29AM +0000, Dexuan Cui wrote:
> 
> > However, in Ubuntu 20.04, the git doesn't show the deleted file
> > arch/x86/mach-generic/probe.c at all:
> 
> It does; it's part of this rename:
> 
> >  arch/x86/{mach-generic/probe.c => kernel/probe_32.c} | 92
> ++++++++++++++++++
> 
> Rename detection was turned on by default in Git v2.0. 

Ah, got it! Thanks for the quick reply! I should have checked it more carefully. :-)

Thanks, -- Dexuan

← back to recent threads