All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Vereshagin <peter@vereshagin.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: 'show' pretty %B without a diff
Date: Mon, 20 Dec 2010 14:12:15 +0300	[thread overview]
Message-ID: <20101220111214.GD10354@external.screwed.box> (raw)
In-Reply-To: <7vmxo0ddbm.fsf@alter.siamese.dyndns.org>

Hey Mr(s) Junio show some good to me!
2010/12/20 01:05:17 -0800 Junio C Hamano <gitster@pobox.com> => To Peter Vereshagin :

JCH> > I'd like to output a comment in my script.
JCH> > Thus, I try: 'git show --format="%B" commitId'
JCH> > There is always diff in the end of the output. No matter what format I specify, even when it is empty.
JCH> > How can I avoid diff output in the 'git show'?
JCH> 
JCH> The best answer to "avoid" it would be not to use "git show"; after all
JCH> the command is about showing the change it introduces when it is used on a
JCH> commit.
JCH> 
JCH> Especially if you are doing a script, you probably should be using
JCH> "cat-file commit" anyway, no?

cat-file doesn't seem to support formatting option?
Also, it outputs 4 more unwanted fields than just the %B... used with the -p is
the only what looks like the what I asked. Is it appropriate in a general case
to skip the everything on that output till the first empty line? cause I'm not
sure those are always 4 and not-empty lines.

Thanks anyway, it's just better than nothing. Although I wish the -p for
cat-file to behave like the simlar-minded --pretty of the 'show'. (=

Or the Git.pm just to have a functionality to get the %B of the commit.

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.org

  reply	other threads:[~2010-12-20 11:12 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 [this message]
2010-12-20 18:05     ` Junio C Hamano
2010-12-21 11:04       ` Peter Vereshagin
2010-12-21 12:56         ` Jakub Narebski
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=20101220111214.GD10354@external.screwed.box \
    --to=peter@vereshagin.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.