# What should I use instead of git show?

11 messages from 2006-03-13 to 2006-03-20. Participants: Olivier Galibert, Radoslaw Szkodzinski, Linus Torvalds, Mark Hollomon, Junio C Hamano, Paul Mackerras.
Thread: https://gitlist.dev/t/3640

## Olivier Galibert, 2006-03-13 14:47

Subject: What should I use instead of git show?
Message-ID: <20060313144747.GA81092@dspnet.fr.eu.org>
URL: https://gitlist.dev/e/20060313144747.GA81092%40dspnet.fr.eu.org

```
Since it seems to be gone.

Up until now, when I wanted to send a patch to someone with the
associated changelog, I just did a git log to find the changelog sha1
then a git show to get the goods.  How am I supposed to do that now?

  OG.

```

## Radoslaw Szkodzinski, 2006-03-13 16:17

Subject: Re: What should I use instead of git show?
Message-ID: <200603131717.53416.astralstorm@o2.pl>
URL: https://gitlist.dev/e/200603131717.53416.astralstorm%40o2.pl
In-Reply-To: <20060313144747.GA81092@dspnet.fr.eu.org>

```
On Monday 13 March 2006 15:47, Olivier Galibert wrote yet:
> Since it seems to be gone.
>
> Up until now, when I wanted to send a patch to someone with the
> associated changelog, I just did a git log to find the changelog sha1
> then a git show to get the goods.  How am I supposed to do that now?
>
>   OG.

Why not use git-whatchanged? It's exacly meant to do this.
Or try qgit, or even gitk (which is what git show did).

--
GPG Key id:  0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2

AstralStorm

```

## Linus Torvalds, 2006-03-13 16:33

Subject: Re: What should I use instead of git show?
Message-ID: <Pine.LNX.4.64.0603130830050.3618@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0603130830050.3618%40g5.osdl.org
In-Reply-To: <200603131717.53416.astralstorm@o2.pl>

```


On Mon, 13 Mar 2006, Radoslaw Szkodzinski wrote:
> On Monday 13 March 2006 15:47, Olivier Galibert wrote yet:
> > Since it seems to be gone.
> >
> > Up until now, when I wanted to send a patch to someone with the
> > associated changelog, I just did a git log to find the changelog sha1
> > then a git show to get the goods.  How am I supposed to do that now?
> >
> >   OG.
> 
> Why not use git-whatchanged? It's exacly meant to do this.
> Or try qgit, or even gitk (which is what git show did).

Why not just use "git show"?

It hasn't gone anywhere that I know of. It's still there.

Are you stuck with an older version of git that doesn't have it? If so, 
you can indeed do

	git whatchanged -p -1 <sha1>

instead (actually, if your git is really old, you shouldn't use the modern 
shorthand of "-1", you should use the longer "--max-count=1" instead).

		Linus

```

## Olivier Galibert, 2006-03-13 16:50

Subject: Re: What should I use instead of git show?
Message-ID: <20060313165015.GC87487@dspnet.fr.eu.org>
URL: https://gitlist.dev/e/20060313165015.GC87487%40dspnet.fr.eu.org
In-Reply-To: <200603131717.53416.astralstorm@o2.pl>

```
On Mon, Mar 13, 2006 at 05:17:47PM +0100, Radoslaw Szkodzinski wrote:
> On Monday 13 March 2006 15:47, Olivier Galibert wrote yet:
> > Since it seems to be gone.
> >
> > Up until now, when I wanted to send a patch to someone with the
> > associated changelog, I just did a git log to find the changelog sha1
> > then a git show to get the goods.  How am I supposed to do that now?
> 
> Why not use git-whatchanged? It's exacly meant to do this.

Indeed, git-whatchanged -p origin..HEAD worked.  Thanks.


> Or try qgit, or even gitk (which is what git show did).

gitk does not seem to have an export function.  Dunno about qgit.

  OG.

```

## Olivier Galibert, 2006-03-13 16:58

Subject: Re: What should I use instead of git show?
Message-ID: <20060313165842.GD87487@dspnet.fr.eu.org>
URL: https://gitlist.dev/e/20060313165842.GD87487%40dspnet.fr.eu.org
In-Reply-To: <Pine.LNX.4.64.0603130830050.3618@g5.osdl.org>

```
On Mon, Mar 13, 2006 at 08:33:22AM -0800, Linus Torvalds wrote:
> Why not just use "git show"?
> 
> It hasn't gone anywhere that I know of. It's still there.

Oh beautiful.

I had an old (as in 3 months max, but heh) git-tree at work in a
corner from which I had compiled git.  When I saw it didn't have git
show which I have at home I did a git pull, recompile, reinstall.

The new git didn't have git show, so I thought it had been removed
after all.  Turns out, the git pull had broken halfway due to the old
version of git.  It hadn't fast forwarded _all_ the versions.  But the
new git, while not current, has been able to do the complete git pull
this time.  And now I have git show at work too.

Guess you have to update git every month or so if you want to be able
to follow current trees.

  OG.

```

## Mark Hollomon, 2006-03-13 23:26

Subject: Re: What should I use instead of git show?
Message-ID: <4415FFB8.3000001@comcast.net>
URL: https://gitlist.dev/e/4415FFB8.3000001%40comcast.net
In-Reply-To: <Pine.LNX.4.64.0603130830050.3618@g5.osdl.org>

```
Linus Torvalds wrote:
> 
> 
> 	git whatchanged -p -1 <sha1>
> 
> instead (actually, if your git is really old, you shouldn't use the modern 
> shorthand of "-1", you should use the longer "--max-count=1" instead).

I must be misunderstanding this:

	git whatchanged -p -1 HEAD

in the current git tree results in nothing. only when I get to -5 does it show something.

Is this expected?

 > git version
git version 1.2.4.gea75

-- 
Mark Hollomon

```

## Junio C Hamano, 2006-03-13 23:55

Subject: Re: What should I use instead of git show?
Message-ID: <7vmzftq4r4.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vmzftq4r4.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <4415FFB8.3000001@comcast.net>

```
Mark Hollomon <markhollomon@comcast.net> writes:

> I must be misunderstanding this:
>
> 	git whatchanged -p -1 HEAD
>
> in the current git tree results in nothing. only when I get to -5 does it show something.
>
> Is this expected?
>
>> git version
> git version 1.2.4.gea75

In this case what matterks is not the version of your git but
what that HEAD is.  If it is a merge commit, whatchanged -p does
not show anything by default.

```

## Junio C Hamano, 2006-03-14 03:09

Subject: Re: What should I use instead of git show?
Message-ID: <7vr755oh6r.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vr755oh6r.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060313144747.GA81092@dspnet.fr.eu.org>

```
Olivier Galibert <galibert@pobox.com> writes:

> Up until now, when I wanted to send a patch to someone with the
> associated changelog, I just did a git log to find the changelog sha1
> then a git show to get the goods.  How am I supposed to do that now?

"git show" is fine and it is still there, but there is a command
designed specifically for that purpose: format-patch.

```

## Mark Hollomon, 2006-03-14 11:49

Subject: Re: What should I use instead of git show?
Message-ID: <4416ADBF.9020906@comcast.net>
URL: https://gitlist.dev/e/4416ADBF.9020906%40comcast.net
In-Reply-To: <7vmzftq4r4.fsf@assigned-by-dhcp.cox.net>

```
Junio C Hamano wrote:
> Mark Hollomon <markhollomon@comcast.net> writes:
> 
>> I must be misunderstanding this:
>>
>> 	git whatchanged -p -1 HEAD
>>
>> in the current git tree results in nothing. only when I get to -5 does it show something.
>>
>> Is this expected?
>>
>>> git version
>> git version 1.2.4.gea75
> 
> In this case what matterks is not the version of your git but
> what that HEAD is.  If it is a merge commit, whatchanged -p does
> not show anything by default.

Oh, I see. As a pass through to git-rev-list that makes sense. --max-count is really 
-max-commits-to-consider (or something like that).

Is there a --max-commits-to-show?

-- 
Mark Hollomon

```

## Paul Mackerras, 2006-03-20 11:33

Subject: Re: What should I use instead of git show?
Message-ID: <17438.37643.583091.800359@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/17438.37643.583091.800359%40cargo.ozlabs.ibm.com
In-Reply-To: <20060313165015.GC87487@dspnet.fr.eu.org>

```
Olivier Galibert writes:

> gitk does not seem to have an export function.  Dunno about qgit.

Right-click on a commit should bring up a context menu which includes
a "write commit to file" option.  Or did you mean something different
by "export"?

Paul.

```

## Olivier Galibert, 2006-03-20 13:16

Subject: Re: What should I use instead of git show?
Message-ID: <20060320131606.GA16560@dspnet.fr.eu.org>
URL: https://gitlist.dev/e/20060320131606.GA16560%40dspnet.fr.eu.org
In-Reply-To: <17438.37643.583091.800359@cargo.ozlabs.ibm.com>

```
On Mon, Mar 20, 2006 at 10:33:31PM +1100, Paul Mackerras wrote:
> Olivier Galibert writes:
> 
> > gitk does not seem to have an export function.  Dunno about qgit.
> 
> Right-click on a commit should bring up a context menu which includes
> a "write commit to file" option.  Or did you mean something different
> by "export"?

No, I meant exactly that.  Thanks, that can be quite useful.

  OG.

```
