Skip to content

Commit

Permalink
git-log: make sure we have some commit to start from.
Browse files Browse the repository at this point in the history
When no usable head/tag is specified, git log barfed with
underlying error message from rev-list, which was not helpful.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Jul 27, 2005
1 parent 9969b64 commit b134922
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-log-script
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/sh
. git-sh-setup-script || die "Not a git archive"
revs=$(git-rev-parse --revs-only --default HEAD "$@")
[ "$revs" ] || die "No HEAD ref"
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}

0 comments on commit b134922

Please sign in to comment.