Skip to content
  • Junio C Hamano's avatar
    shortlog: default to HEAD when the standard input is a tty · 3384a2df
    Junio C Hamano authored
    
    
    Instead of warning the user that it is expecting git log output from
    the standard input (and waiting for the user to type the log from
    the keyboard, which is a silly thing to do), default to traverse from
    HEAD when there is no rev parameter given and the standard input is
    a tty.
    
    This factors out a useful helper "add_head()" from builtin-diff.c to a
    more appropriate place revision.c while renaming it to more descriptive
    name add_head_to_pending(), as that is what the function is about.
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    3384a2df