Re: [BUG] 'git log --quiet' doesn't suppress the output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 6, 2009 at 11:56 PM, Jeff King <peff@xxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux