From: Jakub Narebski <jnareb@gmail.com>
To: Peter Vereshagin <peter@vereshagin.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: 'show' pretty %B without a diff
Date: Tue, 21 Dec 2010 04:56:30 -0800 (PST) [thread overview]
Message-ID: <m38vzjl1yr.fsf@localhost.localdomain> (raw)
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 :
> 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
next prev parent reply other threads:[~2010-12-21 12:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 7:38 'show' pretty %B without a diff Peter Vereshagin
2010-12-20 9:05 ` Junio C Hamano
2010-12-20 11:12 ` Peter Vereshagin
2010-12-20 18:05 ` Junio C Hamano
2010-12-21 11:04 ` Peter Vereshagin
2010-12-21 12:56 ` Jakub Narebski [this message]
2010-12-21 18:04 ` Jonathan Nieder
2010-12-21 20:27 ` Martin Langhoff
2010-12-21 20:40 ` Jakub Narebski
2010-12-22 18:33 ` peter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m38vzjl1yr.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peter@vereshagin.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).