Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug: top_commit_of_remote_branch #563

Open
sale3 opened this issue Nov 20, 2024 · 0 comments · May be fixed by #573
Open

Potential bug: top_commit_of_remote_branch #563

sale3 opened this issue Nov 20, 2024 · 0 comments · May be fixed by #573
Labels
good first issue Good for newcomers

Comments

@sale3
Copy link
Contributor

sale3 commented Nov 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:

  • 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?

@sale3 sale3 changed the title Potential bug: `top_commit Potential bug: top_commit_of_remote_branch Nov 20, 2024
@sale3 sale3 added the good first issue Good for newcomers label Nov 20, 2024
@renatav renatav linked a pull request Dec 13, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant