Permalink
Browse files

Support short date format for git-blame

Setting git-blame's date format to 'short' caused the syntax regex to 
no longer match. This change marks the time and timezone as optional.

This should support both the default 'iso' format, and 'short'. The
other formats (relative, default, rfc and local) are left unsupported.

(Yes. Git blame has a date format called "default", that is not the 
default format. Go figure)
  • Loading branch information...
martinsvalin committed Oct 19, 2012
1 parent 964c1b1 commit 63d1b7d8c94a9d1a23db822c777c7f1ce822ef1a
Showing with 1 addition and 1 deletion.
  1. +1 −1 syntax/Git Blame.tmLanguage
@@ -40,7 +40,7 @@
</dict>
</dict>
<key>match</key>
- <string>^(\^?[a-f0-9]+)\s+([\w\-\d\.\/]*)\s*\((.*?)\s+(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d [+-]\d{4})\s+(\d+)\)</string>
+ <string>^(\^?[a-f0-9]+)\s+([\w\-\d\.\/]*)\s*\((.*?)\s+(\d{4}-\d\d-\d\d( \d\d:\d\d:\d\d [+-]\d{4})?)\s+(\d+)\)</string>
<key>name</key>
<string>line.comment.git-blame</string>
</dict>

0 comments on commit 63d1b7d

Please sign in to comment.