You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In general, when copying the URL, for many - it might make more sense to share the permanent link to avoid any surprises later. Sharing just the file URL might just become invalid/incorrect if any commit (later) changes the corresponding file/piece of code.
Being able to share the permanent link would help solve this problem.
Describe the solution you'd like
Design: (user-facing) Having an option with what='permalink' or something similar would help.
The URL pattern, for at least GitHub would look like:
Implementation (dev-facing): commit_hash would store the output of system({ "git", "-C", cwd, "rev-parse", "HEAD" }, "Failed to get current commit")[1]. We'll probably need something similar for bitbucket/others (I've not tested them yet, can do once this is approved).
Describe alternatives you've considered
I tried passing the commit to the URL patterns from the user side, but then realised that commit variable does not really store the commit has value. Was my bad, I'm not aware of any other alternatives with this plugin.
Additional context
I'll be happy to help create a PR if this feature request sounds reasonable to the maintainers. Thanks for the amazing work!
The text was updated successfully, but these errors were encountered:
Hi, @folke - Apologies for the ping, just curious - does this sound like a feature that you'd like to have in gitbrowse? If yes, I'll be happy to send the patch over.
Did you check the docs?
Is your feature request related to a problem? Please describe.
In general, when copying the URL, for many - it might make more sense to share the permanent link to avoid any surprises later. Sharing just the file URL might just become invalid/incorrect if any commit (later) changes the corresponding file/piece of code.
Being able to share the permanent link would help solve this problem.
Describe the solution you'd like
Design: (user-facing) Having an option with
what='permalink'
or something similar would help.The URL pattern, for at least GitHub would look like:
Implementation (dev-facing):
commit_hash
would store the output ofsystem({ "git", "-C", cwd, "rev-parse", "HEAD" }, "Failed to get current commit")[1]
. We'll probably need something similar for bitbucket/others (I've not tested them yet, can do once this is approved).Describe alternatives you've considered
I tried passing the
commit
to the URL patterns from the user side, but then realised thatcommit
variable does not really store the commit has value. Was my bad, I'm not aware of any other alternatives with this plugin.Additional context
I'll be happy to help create a PR if this feature request sounds reasonable to the maintainers. Thanks for the amazing work!
The text was updated successfully, but these errors were encountered: