https://github.com/msiebuhr/jujutsu-link
Hacked-up copy of git-link for jujutsu
https://github.com/msiebuhr/jujutsu-link
Last synced: about 2 months ago
JSON representation
Hacked-up copy of git-link for jujutsu
- Host: GitHub
- URL: https://github.com/msiebuhr/jujutsu-link
- Owner: msiebuhr
- License: mit
- Created: 2024-09-24T06:48:01.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T10:23:53.000Z (7 months ago)
- Last Synced: 2025-02-08T13:23:29.227Z (4 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Jujutsu Link
============I've grown quite used to having [`git link
`](https://github.com/msiebuhr/git-link) around when needing to
point to something in git repository, and was missing that in `jj`:```sh
# Link to the repository
jj-link
https://github.com/msiebuhr/jujutsu-link# Link to a particular commit
jj-link -r xk
https://github.com/msiebuhr/jujutsu-link/commit/ab43e20c55ae8f9202290e1356a0d60b58d1d4f4# Link to a particular file
jj-link -r sm LICENSE
https://github.com/msiebuhr/jujutsu-link/-/blob/ec05f9b865f408b028f3930c88ce2792dbb29269/README
```It works by reading the URL from `jj git remote list` to get both repository
hostname/path and make a qualified guess at what kind of forge is in use.Installation
------------There are no dependencies; drop it in your path somewhere. I use `~/.local/bin`.
Ideas
------ `git-link` works quite well as it's obvious doesn't refer to code in the
staging area. Jujutsu doesn't quite work that way, so users easily end up
referring to in-progress code. Perhaps default `--revision` to the first
commit marked `immutable`?
- Support `--repository` for consistency
- Allow linking to particular lines in files. Perhaps re-use vim syntax: `jj-link +123`?
- Add `--open` for automatically opening in a browser.
- Propose for inclusion in Jujutsu's ['forge' roadmap](https://martinvonz.github.io/jj/latest/roadmap/#forge-integrations)
- Adapt to whatever ends up with