GitLink
GitLink copied to clipboard
Bitbucket cloud generates links to HEAD
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.
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?
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.