juhp / fbrnch

Tool to update fedora packages branches
https://hackage.haskell.org/package/fbrnch
GNU General Public License v2.0
23 stars 3 forks source link

`Not a pkg git dir` failure when a dist-git repo has another remote besides `origin` #33

Closed gotmax23 closed 2 years ago

gotmax23 commented 2 years ago
[gotmax@ftop] ~/.../ansible.repos/ansible >>> fedpkg fork                                          ±[●][epel8-next]
Repo 'https://src.fedoraproject.org/fork/gotmax23/rpms/ansible' already exists.
Adding as remote 'gotmax23'.
[gotmax@ftop] ~/.../ansible.repos/ansible >>> fbrnch build -n                                      ±[●][epel8-next]
fbrnch: Not a pkg git dir: ansible
[gotmax@ftop] ~/.../ansible.repos/ansible >>> git remote rm gotmax23                               ±[●][epel8-next]
[gotmax@ftop] ~/.../ansible.repos/ansible >>> fbrnch build -n
git fetching ansible... done
newer branch is not ancestor

ansible-5.8.0-1.el8.next is already built

Can you relax the Not a pkg git dir check so it is possible use fbrnch in git repos with multiple remotes?

juhp commented 2 years ago

Sure, will look into it, that should be possible to handle indeed

juhp commented 2 years ago

I think this fixes it.

Thanks a lot for reporting it.

gotmax23 commented 2 years ago

I can confirm that https://github.com/juhp/fbrnch/commit/b304a9171ddd843d5ff1b827790444bb0cbb0498 fixes this issue. Thanks!