GNOME Bugzilla – Bug 605021
Update to current cgit stable version
Last modified: 2009-12-21 14:42:34 UTC
Hi, current cgit stable version is 0.8.3.1 , it would be good to upgrade for some features (highlighted source files, side by side diffs) but the feature I prefer is that it can link #bug_number in commit messages to the corresponding bugzilla link, so we dont have to copy paste the number and enter manually the url in the browser. Than is done implementing a commit-filter hook, like the following: The setup: $ grep filter /etc/cgitrc commit-filter=/home/larsh/bin/cgit-commit-filter.sh $ cat ~/bin/cgit-commit-filter.sh #/bin/sh sed -re 's|\b([0-9a-fA-F]{10,40})\b|<a href="./?id=\1">\1</a>|g'
It also highlights directories in the tree, see how it looks in http://hjemli.net/git/cgit/tree/?id=41934a3222cd3e5a5f214e4275929519c70d311d
Upgraded git,cgit. No configuration changes made aside from the URL location.
The tag was set wrongly, or something. Had to make a tar.bz2 myself. Upgraded cgit again.
See http://hjemli.net/git/cgit/tree/filters/syntax-highlighting.sh for instructions on turning on syntax highlighting.
Added a commit-filer to do the GNOME Bugzilla links
Thanks Olav! now we have a better cgit.. about the commit-filter for bugzilla links, is working OK for "Bug 123456" strings but not for "#123456" strings, if you don't have time and post the commit-filter script I could try to help with that. Thanks again!
Not linking # is on purpose. I do not like it and bugzilla doesn't do it anyway.
What is the reasoning not linking # ? that way the feature is not complete because there are lots of commits like http://git.gnome.org/browse/nautilus/commit/?id=e487552287e5970dbbb39199b55026f2788bb42b and so we are again entering url's manually in the browser.
Because Bugzilla doesn't do it. Using a sole # in commit messages vs 'bug' on Bugzilla is inconsistent. The example you just gave has the text "bug #598931". That is something which is supported by Bugzilla. I've amended the script.
Ok, I suppose is good enough, thanks for working on this.
Added syntax highlighting.