Re: [PATCH v17 1/2] refactor format_branch_comparison in preparation
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Jan 9, 2026, 15:23 UTC
- Message-ID
- <20260109152339.70643-1-haraldnordgren@gmail.com>
- In-Reply-To
- <daab4e8f-cd9e-40af-bdfd-c5884d15d852@gmail.com>
> I wondered why we needed to pass sti as well as ours and theirs but it > is because when we're using AHEAD_BEHIND_QUICK our and theirs are always > zero and so we need to check sti to see if the branch is up to date. > Perhaps we could make this a boolean called 'up_to_date' ?
Yes, this is the reason. And I tried a lot of things to get around it. But yes, let's pass this boolean instead.
> This could be 'bool' not 'int' > > Everything else looks fine - it is a faithful conversion from the > original and it makes sense to check if the upstream is gone in the caller.
Done, will be in the next patch.
I didn't update the signature of 'format_tracking_info' to have a bool there too, because it makes the surface area bigger of also updating the .h file there.
Harald