With --dry-run --verbose, "git reflog expire --all" reports entries as "would prune". With refs named on the command line, it reports them as "prune", which looks as if they were removed. Laveesh Bansal's patch says nothing is removed in either case and only the label is wrong.
The patch traces the bug to fcd2c3d9d8 (2021-12-22), which added dry_run to struct expire_reflog_policy_cb and set it in the --all loop but not in the loop for named refs. The patch sets it there too and adds tests for named refs and --all. No test previously checked the keep/prune wording.
Junio C Hamano said the fix obviously mimics what happens in the "if (do_all)" branch. He wondered why nobody finds it disgusting that the for_each_string_list_item() loop and the later loop over rgc look so similar.
He sketched a restructuring. The --all case and each argument would first be collected into one strvec or string list, and a single loop would then expire each ref's reflog. In his view that would keep a similar bug from recurring, because only one place would set up the policy.
Laveesh agreed the consolidation is doable but proposed keeping this patch as it is, since it fixes the reported bug. The consolidation would follow as a separate patch, and the new tests would remain useful for it. Junio earlier said a plan along those lines sounded good to him.