{
struct commit_list *parents;
struct commit *obj = lookup_commit(sha1);
+
+ if (obj->object.parsed)
+ return;
+
parse_commit(obj);
parents = obj->parents;
char *arg = argv[i];
if (!strcmp(arg, "--cache")) {
- read_cache_file(argv[2]);
- i++;
+ read_cache_file(argv[++i]);
continue;
}