git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Pickens <jepicken@gmail.com>
To: Git ML <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [BUG] 'git log --quiet' doesn't suppress the output
Date: Sat, 7 Feb 2009 00:18:52 -0700	[thread overview]
Message-ID: <885649360902062318n4e51ded0r957f6199ff9afc1a@mail.gmail.com> (raw)
In-Reply-To: <20090207065602.GA14995@coredump.intra.peff.net>

On Fri, Feb 6, 2009 at 11:56 PM, Jeff King <peff@peff.net> wrote:
> On Fri, Feb 06, 2009 at 11:44:59PM -0700, James Pickens wrote:
>
>> I was writing a script, and looking for a way to figure out
>> whether there were any commits in origin/master that aren't in
>> master (i.e., whether I need to pull before I can push), and 'git
>> log --quiet origin/master..master' was the first thing I thought
>> of.
>
> OK, that does make sense.
>
> In this case, though, you should be using the "git rev-list" plumbing
> instead of the "git log" porcelain for a script. And "git rev-list" does
> support "--quiet", but it doesn't quite do what you want. It silences
> the output, but the exit code does not depend on whether or not there
> were any commits in range.

Thanks for the tip; I'll just use rev-list and check if it gave any
output.

James

      reply	other threads:[~2009-02-07  7:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05  2:19 [BUG] 'git log --quiet' doesn't suppress the output James Pickens
2009-02-06 19:11 ` Jeff King
2009-02-07  6:44   ` James Pickens
2009-02-07  6:56     ` Jeff King
2009-02-07  7:18       ` James Pickens [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=885649360902062318n4e51ded0r957f6199ff9afc1a@mail.gmail.com \
    --to=jepicken@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).