GitLink icon indicating copy to clipboard operation
GitLink copied to clipboard

Bitbucket cloud generates links to HEAD

Open l0co opened this issue 2 years ago • 2 comments

I've recently noticed that all links to bitbucket cloud are generated to /HEAD (eg. https://bitbucket.org/context_name/project_name/src/HEAD/...) what is reported by bitbucket as non existing link. The appropriate link should include commit number instead of /HEAD (eg. https://bitbucket.org/context_name/project_name/src/aca04252a8f8b96e7e3a38bd280385462b0b05fb/...)

The git environment is not dirty and there are no commits which weren't pushed to remote.

l0co avatar Sep 13 '22 09:09 l0co

That's strange, I'm not sure where it's getting HEAD from. The template doesn't mention it here and the tests look good here. Could there be a redirect happening? What URL do you see if you use the copy to clipboard action instead?

ben-gibson avatar Sep 24 '22 18:09 ben-gibson

The copied link is also with HEAD but I've found the culprit - it's Check commit on remote feature. If this feature is enabled, the link is appropriate, if disabled, HEAD link is generated. At least for Bitbucket cloud.

l0co avatar Sep 27 '22 08:09 l0co