]> git.ipfire.org Git - thirdparty/git.git/blobdiff - list-objects-filter-options.c
grep tests: move binary pattern tests into their own file
[thirdparty/git.git] / list-objects-filter-options.c
index c0036f73789d1a6a3ff88a76c3838241e65ca868..1cb20c659c82b151a652da0528d0673ac629cc6c 100644 (file)
@@ -78,9 +78,12 @@ static int gently_parse_list_objects_filter(
                return 0;
 
        } else if (skip_prefix(arg, "sparse:path=", &v0)) {
-               filter_options->choice = LOFC_SPARSE_PATH;
-               filter_options->sparse_path_value = strdup(v0);
-               return 0;
+               if (errbuf) {
+                       strbuf_addstr(
+                               errbuf,
+                               _("sparse:path filters support has been dropped"));
+               }
+               return 1;
        }
        /*
         * Please update _git_fetch() in git-completion.bash when you
@@ -88,7 +91,7 @@ static int gently_parse_list_objects_filter(
         */
 
        if (errbuf)
-               strbuf_addf(errbuf, "invalid filter-spec '%s'", arg);
+               strbuf_addf(errbuf, _("invalid filter-spec '%s'"), arg);
 
        memset(filter_options, 0, sizeof(*filter_options));
        return 1;
@@ -136,7 +139,6 @@ void list_objects_filter_release(
 {
        free(filter_options->filter_spec);
        free(filter_options->sparse_oid_value);
-       free(filter_options->sparse_path_value);
        memset(filter_options, 0, sizeof(*filter_options));
 }