Matthew DeVore <matvore@xxxxxxxxxx> writes: > @@ -50,6 +50,10 @@ static int gently_parse_list_objects_filter( > return 0; > } > > + } else if (!strcmp(arg, "tree:0")) { > + filter_options->choice = LOFC_TREE_NONE; > + return 0; > + This is not wrong per-se, but I would have expected to see something like: ... else if (skip_prefix(arg, "tree:", ¶m)) { unsigned long depth; if (!git_parse_ulong(param, &depth) || depth != 0) { err = "only 'tree:0' is supported"; return -1; } filter_options->choice = LOFC_TREE_NONE; return 0; so that "tree:1" is rejected not with "invalid filter-spec" but a bit more descriptive "only tree:0 is". Accepting "tree:00" or "tree:0k" is merely an added bogus^wbonus.