Re: [PATCH] shortlog: prompt when reading from terminal by mistake

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

 



Hi,

On Thu, 8 Mar 2007, Junio C Hamano wrote:

> I was trying to see who have been active recently to find GSoC
> mentor candidates by running:
> 
> 	$ git shortlog -s -n --since=4.months | head -n 20
> 
> After waiting for about 20 seconds, I started getting worried,
> thinking that the recent revision traversal updates might have
> had an unintended side effect.
> 
> Not so.  "git shortlog" acts as a filter when no revs are given,
> unlike "git log" which defaults to HEAD.  It was reading from
> its standard input.
> 
> Signed-off-by: Junio C Hamano <junkio@xxxxxxx>

Acked-by: Johannes Schindelin <johannes.schindelin@xxxxxx>

>    Arguably because --since=4.months clearly states I am
>    expecting it to start digging from somewhere, it would be
>    more sensible to default to HEAD in this case.  I suspect it
>    might be as simple as checking argc before we call
>    setup_revisions() and pass "HEAD" as the default parameter to
>    it, but it is getting late here.

Hm. Better check argc _afterwards_, and if it changed, but no pending 
object was there, add "HEAD".

Ciao,
Dscho

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