Skip to content

Instantly share code, notes, and snippets.

@miau
Created February 10, 2012 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miau/1790501 to your computer and use it in GitHub Desktop.
Save miau/1790501 to your computer and use it in GitHub Desktop.
a patch for gitk to show git-svn-ids on headlines
--- gitk.org Mon Jan 16 01:08:02 2012
+++ gitk Fri Feb 10 18:23:31 2012
@@ -1676,6 +1676,10 @@
if {$i >= 0} {
set headline [string trimright [string range $headline 0 $i]]
}
+ set svnrev [lindex [regexp -linestop -inline {git-svn-id:.*@([[:digit:]]+)} $comment] 1]
+ if {$svnrev != {}} {
+ set headline "\[$svnrev\] $headline"
+ }
if {!$listed} {
# git log indents the comment by 4 spaces;
# if we got this via git cat-file, add the indentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment