File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ You are currently in the middle of a merge that has not been fully completed. Y
2525 set msg {}
2626 set parents [list ]
2727 if {[catch {
28+ set name " "
29+ set email " "
2830 set fd [git_read cat-file commit $curHEAD ]
2931 fconfigure $fd -encoding binary -translation lf
3032 # By default commits are assumed to be in utf-8
@@ -34,17 +36,21 @@ You are currently in the middle of a merge that has not been fully completed. Y
3436 lappend parents [string range $line 7 end]
3537 } elseif {[string match {encoding *} $line ]} {
3638 set enc [string tolower [string range $line 9 end]]
37- } elseif {[regexp "author (.*)\\ s<(.*)>\\ s(\\ d.*$)" $line all name email time]} {
38- set commit_author [list name $name email $email date $time ]
39- }
39+ } elseif {[regexp "author (.*)\\ s<(.*)>\\ s(\\ d.*$)" $line all name email time]} { }
4040 }
4141 set msg [read $fd ]
4242 close $fd
4343
4444 set enc [tcl_encoding $enc ]
4545 if {$enc ne {}} {
4646 set msg [encoding convertfrom $enc $msg ]
47+ set name [encoding convertfrom $enc $name ]
48+ set email [encoding convertfrom $enc $email ]
4749 }
50+ if {$name ne {} && $email ne {}} {
51+ set commit_author [list name $name email $email date $time ]
52+ }
53+
4854 set msg [string trim $msg ]
4955 } err]} {
5056 error_popup [strcat [mc " Error loading commit data for amend:" ] " \n\n $err " ]
You can’t perform that action at this time.
0 commit comments