summaryrefslogtreecommitdiff
path: root/git-log-script
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-08-23 17:31:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-23 19:43:57 (GMT)
commit90e18481137b2071b20fc675d69af4fc60a05267 (patch)
treef09e29b1179bb8334d778e764ce3a4f9871d8b19 /git-log-script
parent0360e99d06acfbb0fcb72215cf6749591ee53290 (diff)
downloadgit-90e18481137b2071b20fc675d69af4fc60a05267.zip
git-90e18481137b2071b20fc675d69af4fc60a05267.tar.gz
git-90e18481137b2071b20fc675d69af4fc60a05267.tar.bz2
Make "git-rev-list" work within subdirectories
This trivial patch makes "git-rev-list" able to handle not being in the top-level directory. This magically also makes "git-whatchanged" do the right thing. Trivial scripting fix to make sure that "git log" also works. 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-xgit-log-script3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-log-script b/git-log-script
index 24d1e83..9260f92 100755
--- a/git-log-script
+++ b/git-log-script
@@ -1,5 +1,4 @@
#!/bin/sh
-. git-sh-setup-script || die "Not a git archive"
-revs=$(git-rev-parse --revs-only --default HEAD "$@")
+revs=$(git-rev-parse --revs-only --default HEAD "$@") || exit
[ "$revs" ] || die "No HEAD ref"
git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less}