|
|
Subscribe / Log in / New account

Full commit hashes

Full commit hashes

Posted Dec 15, 2024 14:45 UTC (Sun) by mathstuf (subscriber, #69389)
In reply to: Full commit hashes by pabs
Parent article: Facing the Git commit-ID collision catastrophe

This works better when forges are involved in rendering such things where, generally, a hover will show context on what it is. However, when just using `git log`, I think the date/subject are very helpful. Of course, nothing is stopping anyone from adding such LSP-like behaviors to `vim-fugitive` or Magit, but they don't exist yet AFAIK. And even that is requiring using some kind of smarter tooling than `| less` that is the prevalent default.


to post comments

Full commit hashes

Posted Dec 16, 2024 23:53 UTC (Mon) by pabs (subscriber, #43278) [Link]

Wonder if there is any sane way for `git log` itself to render them, maybe with an option.

There is a hyperlink ANSI escape sequence, and it seems that you can include arbitrary text as the "URL".

On GNOME Terminal at least, that means you can create an underlined sequence, that on mouse hover, will show the commit message summary. Since it strips out tabs, LF and probably more, you can't add the full commit message though.

https://github.com/Alhadis/OSC8-Adoption
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9...

Unfortunately the hover part isn't implemented in Ptyxis, which is the successor to GNOME Console, which was the successor to GNOME Terminal.

KDE Konsole also doesn't enable hyperlink support by default.

https://github.com/Alhadis/OSC8-Adoption/pull/18


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds