Merge branch 'maint'
authorShawn O. Pearce <spearce@spearce.org>
Mon, 9 Jul 2007 01:10:03 +0000 (21:10 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 9 Jul 2007 01:10:03 +0000 (21:10 -0400)
* maint:
git-gui: Skip nicknames when selecting author initials

1  2 
lib/blame.tcl
diff --combined lib/blame.tcl
index dcdb11b1b691b08d5fe254325b9be2db56802724,1d2caac2835c27280e1d4b9ec58c51b746e2dd01..76b5168fb32bd93f7824c2b8fb9ceb8ac7e139e4
@@@ -33,13 -33,6 +33,13 @@@ variable group_colors 
        #ececec
  }
  
 +# Switches for original location detection
 +#
 +variable original_options [list -C -C]
 +if {[git-version >= 1.5.3]} {
 +      lappend original_options -w ; # ignore indentation changes
 +}
 +
  # Current blame data; cleared/reset on each load
  #
  field commit               ; # input commit to blame
@@@ -311,9 -304,8 +311,9 @@@ constructor new {i_commit i_path} 
  
        set req_w [winfo reqwidth  $top]
        set req_h [winfo reqheight $top]
 +      set scr_h [expr {[winfo screenheight $top] - 100}]
        if {$req_w < 600} {set req_w 600}
 -      if {$req_h < 400} {set req_h 400}
 +      if {$req_h < $scr_h} {set req_h $scr_h}
        set g "${req_w}x${req_h}"
        wm geometry $top $g
        update
@@@ -519,7 -511,6 +519,7 @@@ method _exec_blame {cur_w cur_d option
  method _read_blame {fd cur_w cur_d cur_s} {
        upvar #0 $cur_d line_data
        variable group_colors
 +      variable original_options
  
        if {$fd ne $current_fd} {
                catch {close $fd}
                        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
                close $fd
                if {$cur_w eq $w_asim} {
                        _exec_blame $this $w_amov @amov_data \
 -                              [list -M -C -C] \
 +                              $original_options \
                                { original location}
                } else {
                        set current_fd {}