summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-log-script3
-rw-r--r--rev-list.c1
2 files changed, 2 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}
diff --git a/rev-list.c b/rev-list.c
index 2ed5e87..3643adb 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -481,6 +481,7 @@ static void handle_one_commit(struct commit *com, struct commit_list **lst)
int main(int argc, char **argv)
{
struct commit_list *list = NULL;
+ const char *prefix = setup_git_directory();
int i, limited = 0;
for (i = 1 ; i < argc; i++) {