提交 90e18481 编写于 作者: L Linus Torvalds 提交者: Junio C Hamano

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: NLinus Torvalds <torvalds@osdl.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 0360e99d
#!/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}
......@@ -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++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册