git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] git-gui: Fix author name encoding in Amend Last Commit.
@ 2017-02-14 22:46 bernhardu
  0 siblings, 0 replies; only message in thread
From: bernhardu @ 2017-02-14 22:46 UTC (permalink / raw)
  To: git; +Cc: Bernhard Übelacker

From: Bernhard Übelacker <bernhardu@mailbox.org>

In "New Commit" author name is set correctly.
But when doing "Amend Last Commit" the encoding gets wrong.

This patch adds in load_last_commit a similar assignment converting
to tcl encoding for commit_author as already exists for msg.
---
 lib/commit.tcl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/commit.tcl b/lib/commit.tcl
index 83620b7..f5357f2 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -46,6 +46,9 @@ You are currently in the middle of a merge that has not been fully completed.  Y
 				set msg [encoding convertfrom $enc $msg]
 			}
 			set msg [string trim $msg]
+			if {$enc ne {}} {
+				set commit_author [encoding convertfrom $enc $commit_author]
+			}
 		} err]} {
 		error_popup [strcat [mc "Error loading commit data for amend:"] "\n\n$err"]
 		return
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-14 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 22:46 [PATCH/RFC] git-gui: Fix author name encoding in Amend Last Commit bernhardu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).