git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] git-gui: Fix author name encoding in Amend Last Commit.

From
Bbernhardu@mailbox.org <bernhardu@mailbox.org>
Date
Feb 14, 2017, 22:46 UTC
Message-ID
<20170214224631.18012-1-bernhardu@mailbox.org>
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
Message 1 of 1 in “git-gui: Fix author name encoding in Amend Last Commit.”
  1. git-gui: Fix author name encoding in Amend Last Commit.bernhardu@mailbox.org, Feb 14, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.