dandavison / dandavison/delta

🐛 --hyperlinks can't parse GitHub Enterprise URL

Open
#1,122 5 comments 4 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.2k
Forks
572
Avg merge
11m
Merged PRs (30d)
1

Description

I have a case that I think is not solved with just `--hyperlinks` and `--hyperlinks-commit-link-format`. I was excited to emit hyperlinks, but `--hyperlinks-commit-link-format` doesn't really make sense to me, as one has to specify the entire path to a repo, making it useless unless it's replicated across multiple `.gitconfig` files, which is quite prohibitive.

I have a URL like

```
» git remote get-url origin
git@github.COMPANY.com:ORG/repo.git
```

looking at src/git_config/git_config_entry.rs#L23 I would expect the REGEX to be able to take any `github.*\.com` and then it could be parsed completely for any GitHub Enterprise URL. Unless I'm missing something, there's no way to do this currently, as one can only put the `{commit}` in a custom URL.

Contributor guide

Open the contributing guide

Research direction

Read src/git_config/git_config_entry.rs#L23 first, then trace how --hyperlinks and --hyperlinks-commit-link-format handle the shown GitHub Enterprise remote. Done means the git@github.COMPANY.com:ORG/repo.git form can be parsed for commit hyperlinks without requiring the entire repository path to be replicated in configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.