Re: git log --quiet bug?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git log --quiet bug?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:27

Jeff King [off-list ref] writes:
Try:

  test -z "$(git rev-list -1 origin..HEAD)" &&
  echo nothing that needs pushing

You can also use --count to get the exact number, but if you just care
whether there is something or nothing, using "-1" lets git stop the
graph traversal immediately.
Doesn't some variant of "branch -v" show the ahead/behind information for
all branches?

Re: git log --quiet bug?

From: Jeff King <hidden>
Date: 2016-06-15 22:52:27

On Tue, Nov 08, 2011 at 04:04:50PM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
Try:

  test -z "$(git rev-list -1 origin..HEAD)" &&
  echo nothing that needs pushing

You can also use --count to get the exact number, but if you just care
whether there is something or nothing, using "-1" lets git stop the
graph traversal immediately.
Doesn't some variant of "branch -v" show the ahead/behind information for
all branches?
Yeah, but I thought the question was how to figure this out
programatically in a script.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help