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

[PATCH v4 1/3] git-svn: hoist out utf8 prep from t9129 to lib-git-svn

From
EWEric Wong <normalperson@yhbt.net>
Date
Feb 22, 2016, 02:55 UTC
Message-ID
<1456109711-26866-2-git-send-email-normalperson@yhbt.net>
In-Reply-To
<1456109711-26866-1-git-send-email-normalperson@yhbt.net>
We will be reusing this in t9115.
Suggested-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 t/lib-git-svn.sh                       | 12 ++++++++++++
 t/t9129-git-svn-i18n-commitencoding.sh | 12 +-----------
 2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index b0ec12f..6a50b87 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -186,3 +186,15 @@ start_svnserve () {
              --listen-host 127.0.0.1 &
 }
 
+prepare_a_utf8_locale () {
+	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
+}
diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh
index 39b6bcb..8dbd647 100755
--- a/t/t9129-git-svn-i18n-commitencoding.sh
+++ b/t/t9129-git-svn-i18n-commitencoding.sh
@@ -14,17 +14,7 @@ compare_git_head_with () {
 	test_cmp current "$1"
 }
 
-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
+prepare_a_utf8_locale
 
 compare_svn_head_with () {
 	# extract just the log message and strip out committer info.
-- 
EW
Previous: Eric WongNext: Eric Wong
Message 2 of 5 in “git-svn: svn.pathnameencoding for dcommit”
  1. 0/3 git-svn: svn.pathnameencoding for dcommitEric Wong, Feb 22, 2016
  2. 1/3 git-svn: hoist out utf8 prep from t9129 to lib-git-svnEric Wong, Feb 22, 2016
  3. 2/3 git-svn: enable "svn.pathnameencoding" on dcommitEric Wong, Feb 22, 2016
  4. 3/3 git-svn: apply "svn.pathnameencoding" before URL encodingEric Wong, Feb 22, 2016
  5. Junio C HamanoFeb 22, 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.