summaryrefslogtreecommitdiff
path: root/lib/commit.tcl
diff options
context:
space:
mode:
authorLibravatar Pratyush Yadav <me@yadavpratyush.com>2019-09-24 19:50:33 +0530
committerLibravatar Pratyush Yadav <me@yadavpratyush.com>2019-09-24 20:00:36 +0530
commit60c60b627e81bf84e1cb01729d2ae882178f079d (patch)
tree3c5ac2f526f0b10cd0ccf4d11e644390849520b8 /lib/commit.tcl
parentMerge branch 'bp/amend-toggle-bind' (diff)
parenttreewide: correct several "up-to-date" to "up to date" (diff)
downloadtgif-60c60b627e81bf84e1cb01729d2ae882178f079d.tar.xz
Merge branch 'py/git-git-extra-stuff'
Some changes were added directly to git.git's git-gui subtree, instead of being added to the separate git-gui repo and then being pulled back into git.git. This means those changes are now not in the git-gui tree. So pull them back into git-gui so we match with what git.git has (after they pull in the recently added commits). Most of the changes could be added back in via an octopus merge of all the missing branches. But there were two commits (faf420e05a and b71c6c3b64) which touched other parts of git.git along with git-gui, so they had to be added back in via a cherry-pick because directly pulling them in would also pull in all the ancestors of those commits, needlessly bloating git-gui with git.git's history. Thanks to Denton Liu <liu.denton@gmail.com> for providing me with a script to generate and merge all the branches that were missing, which made this task much easier. * py/git-git-extra-stuff: treewide: correct several "up-to-date" to "up to date" Fix build with core.autocrlf=true git-gui: call do_quit before destroying the main window git-gui: workaround ttk:style theme use git-gui: bind CTRL/CMD+numpad ENTER to do_commit git-gui: search for all current SSH key types git-gui: allow Ctrl+T to toggle multiple paths git-gui: fix exception when trying to stage with empty file list git-gui: avoid exception upon Ctrl+T in an empty list git gui: fix staging a second line to a 1-line file git-gui: prevent double UTF-8 conversion git-gui: sort entries in optimized tclIndex Replace Free Software Foundation address in license notices git-gui (MinGW): make use of MSys2's msgfmt
Diffstat (limited to 'lib/commit.tcl')
-rw-r--r--lib/commit.tcl12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 384f18f226..b516aa2990 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -25,6 +25,8 @@ You are currently in the middle of a merge that has not been fully completed. Y
set msg {}
set parents [list]
if {[catch {
+ set name ""
+ set email ""
set fd [git_read cat-file commit $curHEAD]
fconfigure $fd -encoding binary -translation lf
# By default commits are assumed to be in utf-8
@@ -34,9 +36,7 @@ You are currently in the middle of a merge that has not been fully completed. Y
lappend parents [string range $line 7 end]
} elseif {[string match {encoding *} $line]} {
set enc [string tolower [string range $line 9 end]]
- } elseif {[regexp "author (.*)\\s<(.*)>\\s(\\d.*$)" $line all name email time]} {
- set commit_author [list name $name email $email date $time]
- }
+ } elseif {[regexp "author (.*)\\s<(.*)>\\s(\\d.*$)" $line all name email time]} { }
}
set msg [read $fd]
close $fd
@@ -44,7 +44,13 @@ You are currently in the middle of a merge that has not been fully completed. Y
set enc [tcl_encoding $enc]
if {$enc ne {}} {
set msg [encoding convertfrom $enc $msg]
+ set name [encoding convertfrom $enc $name]
+ set email [encoding convertfrom $enc $email]
}
+ if {$name ne {} && $email ne {}} {
+ set commit_author [list name $name email $email date $time]
+ }
+
set msg [string trim $msg]
} err]} {
error_popup [strcat [mc "Error loading commit data for amend:"] "\n\n$err"]