sshaw/git-link ? reverse-engineered prompt

Reverse engineered prompt

Build me an Emacs package that makes it easy to grab a web link for whatever file or commit I’m looking at in a Git repo.

I want commands for the current buffer that copy the URL for the file at the current line or selected region, another command for the current commit, and one for the repo homepage. It should work with common hosting sites like GitHub, GitLab, Bitbucket, Azure DevOps, Codeberg, Gitea, sourcehut, Sourcegraph, and similar self hosted setups. Please make it work nicely from regular file buffers, Dired, Magit buffers, VC revision buffers, and even Tramp files.

The links should go to the right branch or commit, and I want options to control whether line numbers are included, whether the link opens in the browser, and what remote to use by default. If it makes sense, add a small transient style menu too. Please also include tests and make it easy to extend for custom hosts or enterprise git servers.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab