]> git.ipfire.org Git - thirdparty/git.git/blobdiff - list-objects-filter-options.c
Merge branch 'jc/rebase-in-c-5-test-typofix'
[thirdparty/git.git] / list-objects-filter-options.c
index d259bdb2c1490bf8fe3b36e61a9a982b63ab4f3c..e8da2e8581b2df956411f19e796ceb94adcef903 100644 (file)
@@ -49,6 +49,19 @@ static int gently_parse_list_objects_filter(
                        return 0;
                }
 
+       } else if (skip_prefix(arg, "tree:", &v0)) {
+               unsigned long depth;
+               if (!git_parse_ulong(v0, &depth) || depth != 0) {
+                       if (errbuf) {
+                               strbuf_addstr(
+                                       errbuf,
+                                       _("only 'tree:0' is supported"));
+                       }
+                       return 1;
+               }
+               filter_options->choice = LOFC_TREE_NONE;
+               return 0;
+
        } else if (skip_prefix(arg, "sparse:oid=", &v0)) {
                struct object_context oc;
                struct object_id sparse_oid;