Re: 'show' pretty %B without a diff
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 21, 2010, 12:56 UTC
- Message-ID
- <m38vzjl1yr.fsf@localhost.localdomain>
- In-Reply-To
- <20101221104641.GA8600@external.screwed.box>
Peter Vereshagin <peter@vereshagin.org> writes:
> 2010/12/20 10:05:16 -0800 Junio C Hamano <gitster@pobox.com> => To Peter Vereshagin :
Show 5 quoted lines
> JCH> If your script is _not_ parsing the git command output, but is just > JCH> blindly spewing it out to the invoking user, it is Ok to use "show", > JCH> though. Check "-s" option to the "show" command in that case. > > "show" command doesn't seem to have "-s" switch. Skip it up though ;-)
Hmmm... true, unfortunately it is described in hidden corner: when git-show is used to display commits, it accepts diff family options... including `-s' described in git-diff-tree manpage:
-s::
By default, 'git diff-tree --stdin' shows differences,
either in machine-readable form (without '-p') or in patch
form (with '-p'). This output can be suppressed. It is
only useful with '-v' flag. -v::
This flag causes 'git diff-tree --stdin' to also show
the commit message before the differences.I guess that `-s' should be present also in git-show manpage.
There is also `git log -1` (or `git log -1 --no-walk` for paranoid).
-- Jakub Narebski Poland ShadeHawk on #git