question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`check-vcs-permalinks` - Add support for different branch names

See original GitHub issue

Not all repositories use master for their branch name so it would be great if this hook could support other branch names.

Preferably, this would match any blob link that doesn’t contain a full hash (so only matching 0-f with len of 40 or 64) but if you don’t consider that to be a good solution, then being able to specify a list of branches to match would also work, though it would be a lot more likely to lead to non-permalinks not getting matched.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asottilecommented, Apr 6, 2021

YAGNI imo

0reactions
Jackenmencommented, Apr 6, 2021

afaik this is irrelevant for git which uses SHA1 – [A-Fa-f0-9]{7,40} seems fine to me

Right now yes, but Git team is making a continuous effort towards SHA256 support (Git 2.29 introduced experimental support for it, I’m not following it that closely to know how far they are with it now) so I figured it might be worth supporting it already since I don’t think it would cause any issues.

“contains a .” is what pre-commit uses as a decent heuristic for a tag – it’s of course impossible to get this correct

That seems fine, do you think it’s worth providing a custom regex option, or is that just an unnecessary complication (until proven it’s actually needed anyway)?


I can look into PRing this if that’s fine with you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to view file from different branches side-by-side in VS ...
During step 3, I would often like to see code from the other branch alongside (for example, to see which parameters a certain...
Read more >
Working with GitHub Issues in Visual Studio Code
Given how important issues are to our team and other GitHub projects, we wanted to add GitHub issues integration to VS Code.
Read more >
How can I refresh remote Git branches?
Hi,There is a new branch in the remote repository, but it does not appear in the branches pop-up. How can I refresh that...
Read more >
Visual Studio code editor: Eight tips for using GitLab VS Code
You might also consider using the GitLens: Copy Remote File URL , which even includes the commit SHA in the URL, making it...
Read more >
Git: branches in Visual Studio Code - YouTube
https://aka.ms/ vscode -git | Learn all about branch management in Visual Studio Code!#git #github # vscode #visualstudiocode Time Stamps:0:23 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found