openlawlibrary / taf

The Archive Framework
GNU Affero General Public License v3.0
10 stars 10 forks source link

Potential bug: `top_commit_of_remote_branch` #563

Open sale3 opened 6 days ago

sale3 commented 6 days ago

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:

Do we even need both of these functions if they are supposed to do the same thing?