path: root/lib
diff options
authorShawn O. Pearce <>2007-07-09 01:06:43 (GMT)
committerShawn O. Pearce <>2007-07-09 01:06:43 (GMT)
commit88dce86f38bed84abadd73bbc40d9df92b7519db (patch)
treef59eb4e744b3d3a90c453dd78e4573bfaf769ede /lib
parent47282d4646372aa859908c3b9471b96c385abe5f (diff)
git-gui: Skip nicknames when selecting author initials
Our blame viewer only grabbed the first initial of the git.git author string "Simon 'corecode' Schubert". Here the problem was we looked at Simon, pulled the S into the author initials, then saw the single quote as the start of the next name and did not like this character as it was not an uppercase letter. We now skip over single quoted nicknames placed within the author name field and grab the initials following it. So the above name will get the initials SS, rather than just S. Signed-off-by: Shawn O. Pearce <>
Diffstat (limited to 'lib')
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index b523654..1d2caac 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -547,6 +547,10 @@ method _read_blame {fd cur_w cur_d cur_s} {
set a_name {}
catch {set a_name $header($cmit,author)}
while {$a_name ne {}} {
+ if {$author_abbr ne {}
+ && [string index $a_name 0] eq {'}} {
+ regsub {^'[^']+'\s+} $a_name {} a_name
+ }
if {![regexp {^([[:upper:]])} $a_name _a]} break
append author_abbr $_a
unset _a