Revert "Merge branch 'ps/contains-id-error-message' into next"
authorJunio C Hamano <gitster@pobox.com>
Tue, 6 Mar 2018 21:29:24 +0000 (13:29 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Mar 2018 21:29:24 +0000 (13:29 -0800)
This reverts commit a2c8e1f0510403956f3eb488235cbc552503236b, reversing
changes made to cb683e0bf615cfbbe729b561a6ca9484c4bf4596.

parse-options-cb.c
parse-options.h
ref-filter.c
index c7320a73f48d48469ee2c4fd02096b6f96005c0b..c6679cb2cdee15981ee9ef31c402c358a3727d1e 100644 (file)
@@ -78,6 +78,22 @@ int parse_opt_verbosity_cb(const struct option *opt, const char *arg,
        return 0;
 }
 
+int parse_opt_commits(const struct option *opt, const char *arg, int unset)
+{
+       struct object_id oid;
+       struct commit *commit;
+
+       if (!arg)
+               return -1;
+       if (get_oid(arg, &oid))
+               return error("malformed object name %s", arg);
+       commit = lookup_commit_reference(&oid);
+       if (!commit)
+               return error("no such commit %s", arg);
+       commit_list_insert(commit, opt->value);
+       return 0;
+}
+
 int parse_opt_object_name(const struct option *opt, const char *arg, int unset)
 {
        struct object_id oid;
index a912d6ae2891f3d6c1317b5ed673a5f35a34e550..7258fe1c2d7cac07bc5a8aec03e88acc2d8a4cc9 100644 (file)
@@ -236,6 +236,7 @@ extern int parse_opt_expiry_date_cb(const struct option *, const char *, int);
 extern int parse_opt_color_flag_cb(const struct option *, const char *, int);
 extern int parse_opt_verbosity_cb(const struct option *, const char *, int);
 extern int parse_opt_object_name(const struct option *, const char *, int);
+extern int parse_opt_commits(const struct option *, const char *, int);
 extern int parse_opt_tertiary(const struct option *, const char *, int);
 extern int parse_opt_string_list(const struct option *, const char *, int);
 extern int parse_opt_noop_cb(const struct option *, const char *, int);
index fb57964c37e4a2f37ac2e931ec9c568bee29c826..c4a98281fbdb2f5c37eadb0ff21c6fcded30daaf 100644 (file)
@@ -1997,7 +1997,7 @@ static void do_merge_filter(struct ref_filter_cbdata *ref_cbdata)
        free(to_clear);
 }
 
-static int add_str_to_commit_list(struct string_list_item *item, void *commit_list)
+int add_str_to_commit_list(struct string_list_item *item, void *commit_list)
 {
        struct object_id oid;
        struct commit *commit;