]> git.ipfire.org Git - thirdparty/git.git/commit - revision.h
shortlog: default to HEAD when the standard input is a tty
authorJunio C Hamano <gitster@pobox.com>
Tue, 11 Dec 2007 18:09:04 +0000 (10:09 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Dec 2007 01:01:31 +0000 (17:01 -0800)
commit3384a2dfc12f0fecd25ecfd6bfa9ee0d82517bf2
treed9a4d8565acee4ff9423178442f87b1efe815c14
parent97566ea72ea460576ccaea7b51dd32ab33e1c46c
shortlog: default to HEAD when the standard input is a tty

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: Junio C Hamano <gitster@pobox.com>
builtin-diff.c
builtin-log.c
builtin-shortlog.c
revision.c
revision.h