File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed 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
25
25
set msg {}
26
26
set parents [list ]
27
27
if {[catch {
28
+ set name " "
29
+ set email " "
28
30
set fd [git_read cat-file commit $curHEAD ]
29
31
fconfigure $fd -encoding binary -translation lf
30
32
# 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
34
36
lappend parents [string range $line 7 end]
35
37
} elseif {[string match {encoding *} $line ]} {
36
38
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]} { }
40
40
}
41
41
set msg [read $fd ]
42
42
close $fd
43
43
44
44
set enc [tcl_encoding $enc ]
45
45
if {$enc ne {}} {
46
46
set msg [encoding convertfrom $enc $msg ]
47
+ set name [encoding convertfrom $enc $name ]
48
+ set email [encoding convertfrom $enc $email ]
47
49
}
50
+ if {$name ne {} && $email ne {}} {
51
+ set commit_author [list name $name email $email date $time ]
52
+ }
53
+
48
54
set msg [string trim $msg ]
49
55
} err]} {
50
56
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