X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=rev-tree.c;h=03c900f459c0e6ae7fc9455589be00375f44eac8;hb=93256315b2444601a35484f4fb76cd5723284201;hp=c3884e3595cd00f8c1108429060ed195f7506514;hpb=5873b67eef184d771359c187889c6e5c412b9d43;p=git.git diff --git a/rev-tree.c b/rev-tree.c index c3884e35..03c900f4 100644 --- a/rev-tree.c +++ b/rev-tree.c @@ -55,6 +55,10 @@ void process_commit(unsigned char *sha1) { struct commit_list *parents; struct commit *obj = lookup_commit(sha1); + + if (obj->object.parsed) + return; + parse_commit(obj); parents = obj->parents; @@ -85,8 +89,7 @@ int main(int argc, char **argv) char *arg = argv[i]; if (!strcmp(arg, "--cache")) { - read_cache_file(argv[2]); - i++; + read_cache_file(argv[++i]); continue; }