git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PULL] svn pathnameencoding for git svn dcommit

From
Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
Date
Feb 21, 2016, 13:12 UTC
Message-ID
<56C9B7B7.7030406@f2.dion.ne.jp>
In-Reply-To
<20160220233743.GA28606@dcvr.yhbt.net>
On 2016/02/21 8:37 +0900, Eric Wong wrote:
> Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> wrote:
...
Show 13 quoted lines
>> Setting LC_ALL=C.UTF-8 in the test 11-12 made them pass on Cygwin.
>> Same change made the previous version also pass. Please find the patch
>> in the attached output of git format-patch.
> 
> Thanks.  However, I also wonder what happens on machines without
> "C.UTF-8" support (are there still any?).
> 
>> Could you please test with this on non-Cygwin environment?
> 
> Works for me, at least.  I've squashed your changes into the two
> patches already queued up.  I needed to split the
> "export LC_ALL=C.UTF-8" statement into
> "LC_ALL=C.UTF-8 && export LC_ALL" for portability.
Thank you.
Show 9 quoted lines
>> If it made no harm, please tell me what should I do to proceed this patch.
>> Will you (Eric) please make further integration? Shall I make another
>> series (v2) of patches?
> 
> I've pushed out a new branch with your LC_ALL changes squashed
> in.  However I'm unsure if there's any new portability problems
> with LC_ALL=C.UTF-8...
> 
> Junio or anyone else: thoughts?
The test passed on my environment.

I've searched use of LC_ALL values other than "C". It seems be the best to move the variable a_utf8_locale in t9129 to lib-git-svn.sh and use it also in t9115.

t/Makefile:83
> 	$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8

Here, "en_US.UTF-8" is hard-coded. I think this is at least more problematic than hard-coding "C.UTF-8". Beside hard-coding, does this take effect while test-lib.sh does LC_ALL=C ?

t/t9129-git-svn-i18n-commitencoding.sh:17
Show 11 quoted lines
> a_utf8_locale=$(locale -a | sed -n '/\.[uU][tT][fF]-*8$/{
> 	p
> 	q
> }')
>
> if test -n "$a_utf8_locale"
> then
> 	test_set_prereq UTF8
> else
> 	say "# UTF-8 locale not available, some tests are skipped"
> fi

Here, a UTF-8 locale is took from "locale -a", and the test is skipped if not found. This gives "a_utf8_locale=C.utf8" on my Cygwin environment. There was a record that says the difference of ".utf8" and ".UTF-8" caused a failure. https://git.kernel.org/cgit/git/git.git/commit/?id=2de03ebe0635c93e182c3367140f999e79bdadcd

t/lib-gettext.sh:17
Show 6 quoted lines
> 	# is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
> 	is_IS_locale=$(locale -a 2>/dev/null |
> 		sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
> 		p
> 		q
> 	}')
...
Show 5 quoted lines
> 	if test -n "$is_IS_locale" &&
> 		test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
> 	then
> 		# Some of the tests need the reference Icelandic locale
> 		test_set_prereq GETTEXT_LOCALE
...
> 	else
> 		say "# lib-gettext: No is_IS UTF-8 locale available"
> 	fi
(the same logic is used for is_IS.ISO8859-1.)

Here, a UTF-8 locale with hard coded "is_IS" is took from "locale -a", and the test is skipped if not found. This gives "is_IS_locale=is_IS.utf8.utf8" on my Cygwin environment.

-- 
k_satoda
Previous: Eric WongNext: tboegi@web.de
Message 13 of 25 in “enable "svn.pathnameencoding" on dcommit”
  1. 0/2 enable "svn.pathnameencoding" on dcommitKazutoshi Satoda, Feb 8, 2016
  2. 1/2 git-svn: enable "svn.pathnameencoding" on dcommitKazutoshi Satoda, Feb 8, 2016
  3. Eric WongFeb 15, 2016
  4. 2/2 git-svn: apply "svn.pathnameencoding" before URL encodingKazutoshi Satoda, Feb 8, 2016
  5. Eric WongFeb 15, 2016
  6. Eric WongFeb 8, 2016
  7. [PULL] svn pathnameencoding for git svn dcommitEric Wong, Feb 15, 2016
  8. Junio C HamanoFeb 15, 2016
  9. Kazutoshi SatodaFeb 16, 2016
  10. Eric WongFeb 16, 2016
  11. Kazutoshi SatodaFeb 16, 2016
  12. Eric WongFeb 20, 2016
  13. Kazutoshi SatodaFeb 21, 2016
  14. 1/1 t9115: Skip pathnameencoding=cp932 under HFStboegi@web.de, Feb 27, 2016
  15. Eric WongFeb 28, 2016
  16. Torsten BögershausenFeb 28, 2016
  17. Eric WongMar 15, 2016
  18. Torsten BögershausenMar 15, 2016
  19. Eric WongMar 15, 2016
  20. Kazutoshi SatodaMar 16, 2016
  21. Torsten BögershausenMar 17, 2016
  22. Torsten BögershausenMar 17, 2016
  23. Kazutoshi SatodaMar 18, 2016
  24. Torsten BögershausenMar 19, 2016
  25. Kazutoshi SatodaMar 18, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.