git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: bernhardu@mailbox.org
To: git@vger.kernel.org
Cc: "Bernhard Übelacker" <bernhardu@mailbox.org>
Subject: [PATCH/RFC] git-gui: Fix author name encoding in Amend Last Commit.
Date: Tue, 14 Feb 2017 23:46:31 +0100	[thread overview]
Message-ID: <20170214224631.18012-1-bernhardu@mailbox.org> (raw)

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


                 reply	other threads:[~2017-02-14 22:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170214224631.18012-1-bernhardu@mailbox.org \
    --to=bernhardu@mailbox.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).