From: "Kazuhiro Kato via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Kazuhiro Kato <kazuhiro.kato@hotmail.co.jp>,
Kazuhiro Kato <kazuhiro.kato@hotmail.co.jp>
Subject: [PATCH 2/2] fix: when resolving merge conflicts, japanese file names become garbled.
Date: Tue, 18 Feb 2025 22:42:26 +0000 [thread overview]
Message-ID: <c698805f088e0643e5faf027d4eaa6de14d6c1ff.1739918546.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1886.git.git.1739918546.gitgitgadget@gmail.com>
From: Kazuhiro Kato <kazuhiro.kato@hotmail.co.jp>
Signed-off-by: Kazuhiro Kato <kazuhiro.kato@hotmail.co.jp>
---
gitk-git/gitk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 88951ed2384..f4f8dbd5fad 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -8205,12 +8205,13 @@ proc parseblobdiffline {ids line} {
if {$type eq "--cc"} {
# start of a new file in a merge diff
- set fname [string range $line 10 end]
+ set fname_raw [string range $line 10 end]
+ set fname [encoding convertfrom $fname_raw]
if {[lsearch -exact $treediffs($ids) $fname] < 0} {
lappend treediffs($ids) $fname
add_flist [list $fname]
}
-
+ set fname $fname_raw
} else {
set line [string range $line 11 end]
# If the name hasn't changed the length will be odd,
@@ -8310,6 +8311,7 @@ proc parseblobdiffline {ids line} {
set diffinhdr 0
return
}
+ set line [encoding convertfrom $line]
$ctext insert end "$line\n" filesep
} else {
--
gitgitgadget
next prev parent reply other threads:[~2025-02-18 22:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 22:42 [PATCH 0/2] gitk: Fixing file name encoding issues Kazuhiro Kato via GitGitGadget
2025-02-18 22:42 ` [PATCH 1/2] " Kazuhiro Kato via GitGitGadget
2025-02-19 17:30 ` Konstantin Khomoutov
2025-02-19 18:02 ` Junio C Hamano
2025-02-18 22:42 ` Kazuhiro Kato via GitGitGadget [this message]
2025-02-19 18:11 ` [PATCH 2/2] fix: when resolving merge conflicts, japanese file names become garbled Junio C Hamano
2025-02-18 22:52 ` [PATCH 0/2] gitk: Fixing file name encoding issues Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c698805f088e0643e5faf027d4eaa6de14d6c1ff.1739918546.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=kazuhiro.kato@hotmail.co.jp \
/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.
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).