]> git.ipfire.org Git - thirdparty/git.git/blobdiff - list-objects-filter-options.h
bundle: parse filter capability
[thirdparty/git.git] / list-objects-filter-options.h
index 425c38cae9da43830e92965c1b3904c4f52b94ae..2eb6c983949db0354b0041f10c36e24dc2885116 100644 (file)
@@ -72,6 +72,26 @@ struct list_objects_filter_options {
 /* Normalized command line arguments */
 #define CL_ARG__FILTER "filter"
 
+/*
+ * Parse value of the argument to the "filter" keyword.
+ * On the command line this looks like:
+ *       --filter=<arg>
+ * and in the pack protocol as:
+ *       "filter" SP <arg>
+ *
+ * The filter keyword will be used by many commands.
+ * See Documentation/rev-list-options.txt for allowed values for <arg>.
+ *
+ * Capture the given arg as the "filter_spec".  This can be forwarded to
+ * subordinate commands when necessary (although it's better to pass it through
+ * expand_list_objects_filter_spec() first).  We also "intern" the arg for the
+ * convenience of the current command.
+ */
+int gently_parse_list_objects_filter(
+       struct list_objects_filter_options *filter_options,
+       const char *arg,
+       struct strbuf *errbuf);
+
 void list_objects_filter_die_if_populated(
        struct list_objects_filter_options *filter_options);