@@ -4385,12 +4385,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
if (!rev_list_all || !rev_list_reflog || !rev_list_index)
unpack_unreachable_expiration = 0;
- if (pfd.have_revs && pfd.revs.filter.choice) {
- if (!pack_to_stdout)
- die(_("cannot use --filter without --stdout"));
- if (stdin_packs)
+ if (pfd.have_revs && pfd.revs.filter.choice && stdin_packs)
die(_("cannot use --filter with --stdin-packs"));
- }
if (stdin_packs && use_internal_rev_list)
die(_("cannot use internal rev list with --stdin-packs"));