GitLink icon indicating copy to clipboard operation
GitLink copied to clipboard

No option to copy permalink in new version?

Open nazarewk opened this issue 2 years ago • 4 comments

In previous versions i've noticed copying GitHub link gave me a link to the commit. After updating the plugin it copies the branch link, it would be useful to have (separate?) option to copy a permalink directly from IDE.

nazarewk avatar Apr 25 '22 07:04 nazarewk

Hmm, it should be using the commit 🤔. The only reason it would use the branch instead is

  • The commit hasn't been pushed to the remote
  • The Check commit on remote option in the plugin settings has been unchecked.

Can you confirm neither of those are the case?

ben-gibson avatar Apr 26 '22 06:04 ben-gibson

I have unchecked the check commit on remote because it takes a few seconds and breaks seamless usage of the plugin.

nazarewk avatar Apr 26 '22 09:04 nazarewk

The only problem with using the commit without that options enabled is, there's no way to know if it's been pushed to the remote, so the generated URL could lead to a 404. I guess that could always been an option configured from the plugin settings though. For example, when unchecking Check commit on remote. A radio button is shown to choose if the current commit or current branch is preferred

ben-gibson avatar Apr 26 '22 12:04 ben-gibson

It would be great to have an option to prefer copying branches or commits separate from the Check commit on remote

nazarewk avatar Apr 27 '22 06:04 nazarewk

I think this is mostly solved now based on https://github.com/ben-gibson/GitLink/issues/202

ben-gibson avatar Oct 22 '22 17:10 ben-gibson