git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: "Kazutoshi Satoda" <k_satoda@f2.dion.ne.jp>,
	"Eric Wong" <normalperson@yhbt.net>,
	"Torsten Bögershausen" <tboegi@web.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS
Date: Thu, 17 Mar 2016 06:16:45 +0100	[thread overview]
Message-ID: <56EA3DBD.2070105@web.de> (raw)
In-Reply-To: <56E999C3.4040802@f2.dion.ne.jp>

On 2016-03-16 18.37, Kazutoshi Satoda wrote:
> "funcky" looks a typo.
> 
>>>     Don't use funky file names, that can not be created under
>>>     HFS or NTFS.
> 
> The file can be created on my Cygnus environment, which is under FONTS.
> So it looks a bit inaccurate.
> 
> I think a quote from the actual error message may be useful. It will
> likely tell what was wrong, accurately. And also, someone may search for
> that message.
> 
>>> -       neq=$(printf "\201\202") &&
>>> -       git config svn.pathnameencoding cp932 &&
>>> +       neq=$(printf "\303\244") &&
>>> +       git config svn.pathnameencoding ISO8859-1 &&
> 
> The variable name "new" was for "NOT EQUAL TO" (0x8182 in cp932 = U+2260).
> http://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT
> Then it should be changed, too. A more abstract one may be appropriate.
> 
>>> -       inf=$(printf "\201\207") &&
>>> -       git config svn.pathnameencoding cp932 &&
>>> +       inf=$(printf "\303\226") &&
>>> +       git config svn.pathnameencoding ISO8859-1 &&
> 
> Ditto. (0x8187 in cp932 = U+221E, INFINITY)
> 

Agreed with all your comments, thanks for that.
A better version is here:
<https://github.com/tboegi/git/commit/7ea2fa1ffaeb1c05669a837d7fed9c60b8a0d3cb>


commit 7ea2fa1ffaeb1c05669a837d7fed9c60b8a0d3cb
Author: Torsten Bögershausen <tboegi@web.de>
Date:   Thu Mar 17 06:08:14 2016 +0100

    t9115: Use prereq for funky file name

    Some file systems like HFS don't allow file names outside unicode.
    Add a precondition FS_CP932 and use it in t9115#11 and #12

diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh
b/t/t9115-git-svn-dcommit-funky-renames.sh
index 0990f8d..5a6525c 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -93,7 +93,7 @@ test_expect_success 'git svn rebase works inside a
fresh-cloned repository' '
 # > to special UNICODE characters in the range 0xf000 to 0xf0ff (the
 # > "Private use area") when creating or accessing files.
 prepare_a_utf8_locale
-test_expect_success UTF8 'svn.pathnameencoding=cp932 new file on dcommit' '
+test_expect_success UTF8,FS_CP932 'svn.pathnameencoding=cp932 new file on
dcommit' '
 	LC_ALL=$a_utf8_locale &&
 	export LC_ALL &&
 	neq=$(printf "\201\202") &&
@@ -105,7 +105,7 @@ test_expect_success UTF8 'svn.pathnameencoding=cp932 new
file on dcommit' '
 '

 # See the comment on the above test for setting of LC_ALL.
-test_expect_success 'svn.pathnameencoding=cp932 rename on dcommit' '
+test_expect_success UTF8,FS_CP932 'svn.pathnameencoding=cp932 rename on dcommit' '
 	LC_ALL=$a_utf8_locale &&
 	export LC_ALL &&
 	inf=$(printf "\201\207") &&
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0b47eb6..7bb1262 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1037,6 +1037,18 @@ test_lazy_prereq UTF8_NFD_TO_NFC '
 	esac
 '

+test_lazy_prereq FS_CP932 '
+	# check whether FS allows filenames from cp932
+	neq=$(printf "\201\202")
+	>"$neq" &&
+	case "$(echo *)" in
+	"neq")
+		true ;;
+	*)
+		false ;;
+	esac
+'
+
 test_lazy_prereq AUTOIDENT '
 	sane_unset GIT_AUTHOR_NAME &&
 	sane_unset GIT_AUTHOR_EMAIL &&

  reply	other threads:[~2016-03-17  5:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 15:19 [PATCH 0/2] enable "svn.pathnameencoding" on dcommit Kazutoshi Satoda
2016-02-08 15:20 ` [PATCH 1/2] git-svn: " Kazutoshi Satoda
2016-02-15  0:30   ` Eric Wong
2016-02-08 15:21 ` [PATCH 2/2] git-svn: apply "svn.pathnameencoding" before URL encoding Kazutoshi Satoda
2016-02-15  0:33   ` Eric Wong
2016-02-08 22:58 ` [PATCH 0/2] enable "svn.pathnameencoding" on dcommit Eric Wong
2016-02-15  0:52   ` [PULL] svn pathnameencoding for git svn dcommit Eric Wong
2016-02-15 21:32     ` Junio C Hamano
2016-02-16  3:29     ` Kazutoshi Satoda
2016-02-16  6:33       ` Eric Wong
2016-02-16 16:19         ` Kazutoshi Satoda
2016-02-20 23:37           ` Eric Wong
2016-02-21 13:12             ` Kazutoshi Satoda
2016-02-27 18:28   ` [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS tboegi
2016-02-28  4:59     ` Eric Wong
2016-02-28 17:52       ` Torsten Bögershausen
2016-03-15  1:59         ` Eric Wong
2016-03-15  5:23           ` Torsten Bögershausen
2016-03-15  7:09             ` Eric Wong
2016-03-16 17:37               ` Kazutoshi Satoda
2016-03-17  5:16                 ` Torsten Bögershausen [this message]
2016-03-17  5:35                   ` Torsten Bögershausen
2016-03-18  2:15                     ` Kazutoshi Satoda
2016-03-19  6:59                       ` Torsten Bögershausen
2016-03-18  2:14                   ` Kazutoshi Satoda

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=56EA3DBD.2070105@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=k_satoda@f2.dion.ne.jp \
    --cc=normalperson@yhbt.net \
    /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).