Re: [PATCH v17 1/2] refactor format_branch_comparison in preparation
From: Harald Nordgren <hidden>
Date: 2026-01-09 15:23:42
From: Harald Nordgren <hidden>
Date: 2026-01-09 15:23:42
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