Determine LocalAndRemote commit status based on matching remote _and_ matching branch name#11890
Determine LocalAndRemote commit status based on matching remote _and_ matching branch name#11890
LocalAndRemote commit status based on matching remote _and_ matching branch name#11890Conversation
Pass the remote tracking branch ID into local commit collection and use it to detect which local commits are also present on the remote tracking branch. This fixes incorrect commit state reporting by building a revwalk of the remote tracking branch, comparing commit ids, and setting commits to LocalAndRemote or LocalOnly accordingly. Also update callers and a flag name to match the new remote reachability meaning.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@Byron this PR was entirely generated by Claude so maybe disregard the specifics. I was debugging why the top branch had commits that appeared LocalAndRemote when in fact those same commits only existed on the remote in the bottom branch. Claude seemed to confirm that we only check that the commit is reachable on any remote, while it feels to me the check should be for the specific remote, and reachable from a specific branch. Does this make sense to you?
|
LocalAndRemote commit status based on matching remote _and_ matching branch name
|
Thanks a lot for digging into this! I also think this should be fixed, and can be fixed. Will get to it right after #11887 . |
|
As getting into this could be a huge time-sink, I had to put it onto my backlog to be able to focus on unapply(). The only consolation I can give is that I let it jump the queue and put it second. |


It seems we determine the
LocalAndRemotestatus on the commit being reachable by any remote, rather than matching on the specific remote and branch.I noticed the problem when I had two stacked branches, where the remote bottom branch included the commits of the local only top branch. They were both colored as pushed and matching upstream, and the push button was disabled as a consequence.
*edit: code is 100% generated by Claude, so most likely incorrect.