You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like top_commit_of_remote_branch doesn't work properly for one specific repo state.
This is the state where I found the issue: local:
commit 90372b08456673748b303147965f36bb01427126 (HEAD -> master, origin/master) origin:
commit 9faf537d797381aaab997c6e75ab6f5ded506320 (HEAD -> master)
commit 90372b08456673748b303147965f36bb01427126
and the outputs of two commands that fetch top/last remote commit: repo.get_last_remote_commit(repo.get_remote_url()) -> 9faf537d797381aaab997c6e75ab6f5ded506320 repo.top_commit_of_remote_branch(repo.default_branch) -> 90372b08456673748b303147965f36bb01427126
These are the steps to recreate the issue:
Create two commits on local repo and push them to origin
Reset local repo back to the first commit (reset_to_commit)
Try to get top commit with top_commit_of_remote_branch and with get_last_remote_commit and notice the difference.
Do we even need both of these functions if they are supposed to do the same thing?
The text was updated successfully, but these errors were encountered:
sale3
changed the title
Potential bug: `top_commit
Potential bug: top_commit_of_remote_branchNov 20, 2024
It looks like
top_commit_of_remote_branch
doesn't work properly for one specific repo state.This is the state where I found the issue:
local:
commit 90372b08456673748b303147965f36bb01427126 (HEAD -> master, origin/master)
origin:
commit 9faf537d797381aaab997c6e75ab6f5ded506320 (HEAD -> master)
commit 90372b08456673748b303147965f36bb01427126
and the outputs of two commands that fetch top/last remote commit:
repo.get_last_remote_commit(repo.get_remote_url())
->9faf537d797381aaab997c6e75ab6f5ded506320
repo.top_commit_of_remote_branch(repo.default_branch)
->90372b08456673748b303147965f36bb01427126
These are the steps to recreate the issue:
reset_to_commit
)top_commit_of_remote_branch
and withget_last_remote_commit
and notice the difference.Do we even need both of these functions if they are supposed to do the same thing?
The text was updated successfully, but these errors were encountered: