The algorithm here https://github.com/amykyta3/git-me-the-url/blob/main/gitmetheurl/base.py#L143 can take a very long time to process. This is apparent when operating with detached HEAD and an origin with many branches. In our case >2000 branches and the operation look several minutes. This was discovered in our CI where the processing is done detached. There I don't think we have an option to stay attached to a branch.