Re: [PATCH 0/3] Fix misuse of `refs_for_each_ref_in()`
Patrick Steinhardt <ps@pks.im> writes:
Show 18 quoted lines
> Hi,
>
> this small patch series fixes a bug I have discovered where configuring
> "pack.preferBitmapTips" to an exact branch will cause Git to `BUG()`.
>
> The root cause of this bug is misuse of `refs_for_each_ref_in()`: this
> function accepts a prefix to yield refs for, and then strips the prefix
> for each ref. Consequently, if passed an exact refname, then stripping
> the prefix would make us end up with an empty refname, and that is not
> supposed to happen.
>
> There was one other caller that got it wrong, too, and which is also
> fixed in this patch series.
>
> Thanks!
>
> Patrick
>
The patches look good, thanks for the fix!