From 36c8ebed5485c9c773a556c5d2b039dc293f9818 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Tue, 27 Aug 2013 23:24:59 +0100 Subject: [PATCH] t7102: do not assume the system encoding is utf-8 The commit_msg function has an assumption that the string is being output as utf-8. On Windows this is not true so always convert from the system encoding to the desired encoding. Signed-off-by: Pat Thoyts --- t/t7102-reset.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 8d4b50d1b5..b05910962b 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -16,7 +16,7 @@ commit_msg () { msg="modify 2nd file (ge\303\244ndert)\n" if test -n "$1" then - printf "$msg" | iconv -f utf-8 -t "$1" + printf "$msg" | iconv -t "$1" else printf "$msg" fi @@ -60,7 +60,7 @@ check_changes () { test_expect_success 'reset --hard message' ' hex=$(git log -1 --format="%h") && git reset --hard > .actual && - echo HEAD is now at $hex $(commit_msg) > .expected && + echo HEAD is now at $hex $(commit_msg utf-8) > .expected && test_cmp .expected .actual ' -- 2.11.4.GIT