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.
threads / discuss / 3640
Subject: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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
Re: What should I use instead of git show?
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
Re: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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
Re: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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
Re: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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.
Re: What should I use instead of git show?
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.