git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git shortlog vs. stdin
@ 2016-11-15 13:04 Andreas Krey
  2016-11-15 13:39 ` Christian Neukirchen
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Krey @ 2016-11-15 13:04 UTC (permalink / raw)
  To: git

Hi all,

I observed a strange an unexpected behaviour in 'git shortlog'.

When in git.git:

$ git shortlog -sn | wc
   1441    4493   31477

but with input redirected:

$ git shortlog -sn </dev/null | wc
      0       0       0

--no-pager expectedly doesn't help.

Observed with 2.6.2 and 2.10.0-rc1.

I originally stumbled over this while trying something like

$ ls z* | while read name rest; do
  echo "$name" ====; git --no-pager shortlog | tail -4; done

where it also essentially terminates the while loop,
presumably by eating the stdin to the loop.

Bug or feature?

- Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-15 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 13:04 git shortlog vs. stdin Andreas Krey
2016-11-15 13:39 ` Christian Neukirchen

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).