X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=revision.c;h=18b7ebbbd599417462b5c4275c2581b91ebeca6a;hb=3ed24211d48d9a297b3784347acbf7e0265a58f3;hp=c4efe5b22e6f6f7741ed935b015bf6e0ace05d7e;hpb=934f788981de941814e821217f32451a5c715d5d;p=git.git diff --git a/revision.c b/revision.c index c4efe5b22..18b7ebbbd 100644 --- a/revision.c +++ b/revision.c @@ -15,9 +15,9 @@ volatile show_early_output_fn_t show_early_output; -static char *path_name(struct name_path *path, const char *name) +char *path_name(const struct name_path *path, const char *name) { - struct name_path *p; + const struct name_path *p; char *n, *m; int nlen = strlen(name); int len = nlen + 1; @@ -209,7 +209,7 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object } /* - * Tree object? Either mark it uniniteresting, or add it + * Tree object? Either mark it uninteresting, or add it * to the list of objects to look at later.. */ if (object->type == OBJ_TREE) { @@ -994,16 +994,6 @@ static void add_message_grep(struct rev_info *revs, const char *pattern) add_grep(revs, pattern, GREP_PATTERN_BODY); } -static void add_ignore_packed(struct rev_info *revs, const char *name) -{ - int num = ++revs->num_ignore_packed; - - revs->ignore_packed = xrealloc(revs->ignore_packed, - sizeof(const char *) * (num + 1)); - revs->ignore_packed[num-1] = name; - revs->ignore_packed[num] = NULL; -} - static int handle_revision_opt(struct rev_info *revs, int argc, const char **argv, int *unkc, const char **unkv) { @@ -1116,12 +1106,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg revs->edge_hint = 1; } else if (!strcmp(arg, "--unpacked")) { revs->unpacked = 1; - free(revs->ignore_packed); - revs->ignore_packed = NULL; - revs->num_ignore_packed = 0; } else if (!prefixcmp(arg, "--unpacked=")) { - revs->unpacked = 1; - add_ignore_packed(revs, arg+11); + die("--unpacked= no longer supported."); } else if (!strcmp(arg, "-r")) { revs->diff = 1; DIFF_OPT_SET(&revs->diffopt, RECURSIVE); @@ -1689,7 +1675,7 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit) { if (commit->object.flags & SHOWN) return commit_ignore; - if (revs->unpacked && has_sha1_pack(commit->object.sha1, revs->ignore_packed)) + if (revs->unpacked && has_sha1_pack(commit->object.sha1)) return commit_ignore; if (revs->show_all) return commit_show;