Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Make "git log" exit properly if not in a git archive
author
Linus Torvalds
<torvalds@g5.osdl.org>
Sun, 10 Jul 2005 23:10:21 +0000
(16:10 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sun, 10 Jul 2005 23:10:21 +0000
(16:10 -0700)
Instead of getting an incomprehensible error message from git-rev-list.
git-log-script
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0ee19dc
)
diff --git
a/git-log-script
b/git-log-script
index feca5e9b7c86b1aaa5903f1c2ca3afde09531c7b..049d02ea1452bca07188cacecb991a56cd97a5f1 100755
(executable)
--- a/
git-log-script
+++ b/
git-log-script
@@
-1,2
+1,3
@@
#!/bin/sh
#!/bin/sh
+. git-sh-setup-script || die "Not a git archive"
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}