summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@g5.osdl.org>2005-07-10 16:10:21 -0700
committerLibravatar Linus Torvalds <torvalds@g5.osdl.org>2005-07-10 16:10:21 -0700
commit4bc5fbf82e225aef0694c91458c31515409455e6 (patch)
tree3c991815200e970ea9a5cf33703ce220fe7b8cf4
parentAvoid signedness warnings in sha1_file.c (diff)
downloadtgif-4bc5fbf82e225aef0694c91458c31515409455e6.tar.xz
Make "git log" exit properly if not in a git archive
Instead of getting an incomprehensible error message from git-rev-list.
-rwxr-xr-xgit-log-script1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-log-script b/git-log-script
index feca5e9b7c..049d02ea14 100755
--- a/git-log-script
+++ b/git-log-script
@@ -1,2 +1,3 @@
#!/bin/sh
+. git-sh-setup-script || die "Not a git archive"
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}