git shortlog vs. stdin

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

 



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



[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]