public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki•fi>
To: "Santi Béjar" <santi@agolina•net>
Cc: Michael J Gruber <git@drmicha•warpmail.net>,
	Cornelius <c.r1@gmx•de>,
	git@vger•kernel.org
Subject: Plumbing commands (was: Bug report - git show <tagname> together with --pretty=format)
Date: Wed, 08 Apr 2009 22:47:22 +0300	[thread overview]
Message-ID: <87myarszat.fsf_-_@iki.fi> (raw)
In-Reply-To: <adf1fd3d0904080937v634c5b69rffa7a737f22a3768@mail.gmail.com> ("Santi Béjar"'s message of "Wed\, 8 Apr 2009 18\:37\:21 +0200")

On 2009-04-08 18:37 (+0200), Santi Béjar wrote:

> In addition to what Michael said, you should use the plumbing commands
> instead of the porcelain (see man git). They are specifically for use
> with scripts and parse their output. The output from the porcelain
> commands can change.

Hmm, I've been using a command like this in a script:

    date=$(git log -1 --pretty=format:%ai $REV)

Would it be better to change it to

    date=$(git rev-list -1 --pretty=format:%ai $REV | sed -e 1d)

or something else?

      reply	other threads:[~2009-04-08 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 12:56 Bug report - git show <tagname> together with --pretty=format Cornelius
2009-04-08 15:28 ` Michael J Gruber
2009-04-08 16:37   ` Santi Béjar
2009-04-08 19:47     ` Teemu Likonen [this message]

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=87myarszat.fsf_-_@iki.fi \
    --to=tlikonen@iki$(echo .)fi \
    --cc=c.r1@gmx$(echo .)de \
    --cc=git@drmicha$(echo .)warpmail.net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=santi@agolina$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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