Re: [PATCH 1/1] t9115: Skip pathnameencoding=cp932 under HFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
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 &&

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]