summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-log-script2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-log-script b/git-log-script
index 049d02e..24d1e83 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}