Linky selects bad remote when copying links

Issue #22 resolved
Shmuel Goldfarb created an issue

Hi, I work on a project using two remote git repositories:

  1. The actual bitbucket cloud project git repository - "master"

  2. Another remote repository which I manage specific configuration file, and I patch changes from it to the (1) repository.

Problem is when I select copy link it uses the second remote(2), and not the project remote(1), which creates broken links. If I manually change the repository name to the (1) remote in the link generated it works.

Attached is the log file. I hid personal info.

Thanks, Shmuel

Comments (7)

  1. Daniil Penkin staff

    Hi @Ghost93,

    Thanks for using Linky and reaching out!

    I believe what you faced is similar to issue #20. Current strategy of selecting remote is naive and obviously doesn't work well when there's more than one remote :(

    I'll look into fixing this as soon as I have some free time.

    Thanks you for your understanding.

    Cheers, Daniil

  2. Shmuel Goldfarb reporter

    Hi @dpenkin , that was a real quick answer. Thanks.

    Sorry that I have not looked at other issues before I posted here.

  3. Daniil Penkin staff

    =) No worries.

    I'll leave it open for now and will check the logs to confirm there's nothing else involved.

    Thanks a lot!

  4. Daniil Penkin staff

    Hi @Ghost93,

    I've just released Bitbucket Linky 3.4 which, along with other changes, fixes the issue you faced:

    • fixes non-deterministic automatic selection of the remote: now remote is selected based on the tracking information of the current branch OR when such information is not defined, picks origin remote, if it exists OR picks first remote from the list if none of the above are defined. This basically follows IntelliJ's preference, I didn't add anything new.
    • allows to configure a fixed remote to generate links against. If for any reason the algorithm above doesn't suit your needs, you can explicitly set a remote that Linky should always use, no matter what current branch tracking info is. Preferences.png

    Thanks again for reaching out and for your patience!

    Let me know if this helped.

    Cheers, Daniil

  5. Log in to comment