Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect hashes in commit messages and convert them to hyper links #2714

Closed
mnaoumov opened this issue Mar 17, 2015 · 7 comments
Closed

Detect hashes in commit messages and convert them to hyper links #2714

mnaoumov opened this issue Mar 17, 2015 · 7 comments

Comments

@mnaoumov
Copy link
Contributor

The most common useful scenario is message like

(cherry picked from commit 2cb1c1379f6303d4b81a0130d7f7a76b0993568b)

It would be great if you can click on the hash and navigate straight to the commit

@jbialobr
Copy link
Member

You can configure revision links for that. In-place replacement is not implemented.

@vbjay
Copy link
Contributor

vbjay commented Mar 30, 2015

See #1875

@mnaoumov
Copy link
Contributor Author

@vbjay , yeah, that's a bit different. Instead of putting links to the header, I suggested and then implemented conversion hashes to hyperlink in-place in commit message

@pravic
Copy link

pravic commented Jan 31, 2017

You can configure revision links for that. In-place replacement is not implemented.

How? Because setting url to "gitext://gotocommit/{0}" doesn't work.

@jbialobr
Copy link
Member

jbialobr commented Mar 3, 2017

It works for me.
2017-03-03 22_03_03

@pravic
Copy link

pravic commented Mar 5, 2017

Well, gitext://gotocommit works only with full hashes while "View/Go to commit" works with short ones perfectly.

When I clicking on link with short hash (I tried hashes with 8, 16 and 20 characters), the focus just goes away and nothing.

@Radrik5
Copy link
Contributor

Radrik5 commented Mar 14, 2017

I confirm that gitext://gotocommit doesn't work with short hashes. But even if it worked, it would still be less convenient than having these links 'in place'.

At first I was thinking about extending Revision links so that links to GitHub issues also worked 'in place'. But hashes are different: they can be confused with large issue numbers. For example, this is a real issue number from our bug tracker: 964526146. Search pattern [a-f\d]{8,40} successfully matches it and Git Extensions creates Go to commit link that simple doesn't work. Hashes should be validated against commit objects that exist in the repository. And such links will be useful for all users, not just for those who know about Revision links.

@jbialobr jbialobr added this to the 2.50 milestone Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants