On Fri, Apr 4, 2025 at 10:48 PM Yuting Zheng <05zyt30@xxxxxxxxx> wrote: > > Thanks for your review! > > > Another factor is the default format that these two commands use which > > differs. I would heavily lean towards using the format exposed by `git > > show-ref` because it doesn't require us to hit the ODB, and thus it is > > way more efficient. This has bitten me quite often already. > > Thanks for your reminder! I will explain this output format in my next > proposal, and I agree that we should adopt the `git show-ref` format for > its superior efficiency. > > > I don't think it would, both are orthogonal to one another. I don't > > think people _only_ want to format or _only_ want to filter. Quite > > often, they'll want to do both at the same time. > > > > On the topic of filtering and formatting, I plan to implement these as > basic functions that work together seamlessly. In other words, the filter > and format functionalities will be integrated (without being exposed as > separate options) so that users can combine them as needed. I will > submit another email for further discussion about options. > > > > 2. The performance could be worse than `git-for-each-ref`. > > > > Why is that? git-for-each-ref(1) already knows to filter and format, so > > I'd expect the performance to be roughly the same. In fact, I think we > > would be able to improve performance if we changed the default format as > > mentioned above. > > > > I am concerned that iterating over all available options might introduce > additional overhead. > > > > > I don't think this plan would make sense as it would mean that current > > users of git-for-each-ref(1) wouldn't be able to migrate. > > > > Finally, in light of your feedback and Karthik’s, I have decided that > Approach 1 will be my final plan. > > Thanks ! > Zheng Yuting