diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-07-26 20:04:22 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-07-27 11:53:48 -0700 |
commit | b134922992e3051e7095b1e76a89361fea86206d (patch) | |
tree | 73000ff9f50247d6fa79ef6868a09ecd1e418c2b /git-log-script | |
parent | 9969b649999a04d6ce8eebccfc1ee766f6e5377a (diff) | |
download | git-b134922992e3051e7095b1e76a89361fea86206d.tar.gz git-b134922992e3051e7095b1e76a89361fea86206d.tar.xz |
git-log: make sure we have some commit to start from.
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>
Diffstat (limited to 'git-log-script')
-rwxr-xr-x | git-log-script | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/git-log-script b/git-log-script index 049d02ea1..24d1e8394 100755 --- a/git-log-script +++ b/git-log-script @@ -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} |