git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Doan Tran Cong Danh <congdanhqx@gmail.com>
To: git@vger.kernel.org
Cc: peff@peff.net, gitster@pobox.com,
	Doan Tran Cong Danh <congdanhqx@gmail.com>
Subject: [PATCH v6 0/9] sequencer: handle other encoding better
Date: Mon, 11 Nov 2019 13:03:33 +0700	[thread overview]
Message-ID: <cover.1573452046.git.congdanhqx@gmail.com> (raw)
In-Reply-To: <20191031092618.29073-1-congdanhqx@gmail.com>

Change from v5:
- claim t3434 instead of t3433

Doan Tran Cong Danh (9):
  t0028: eliminate non-standard usage of printf
  configure.ac: define ICONV_OMITS_BOM if necessary
  t3900: demonstrate git-rebase problem with multi encoding
  sequencer: reencode to utf-8 before arrange rebase's todo list
  sequencer: reencode revert/cherry-pick's todo list
  sequencer: reencode squashing commit's message
  sequencer: reencode old merge-commit message
  sequencer: reencode commit message for am/rebase --show-current-patch
  sequencer: fallback to sane label in making rebase todo list

 configure.ac                     |  49 ++++++++++++++++++
 sequencer.c                      |  32 ++++++++----
 t/t0028-working-tree-encoding.sh |   4 +-
 t/t3434-rebase-i18n.sh           |  84 +++++++++++++++++++++++++++++++
 t/t3434/ISO8859-1.txt            | Bin 0 -> 15 bytes
 t/t3434/eucJP.txt                | Bin 0 -> 68 bytes
 t/t3900-i18n-commit.sh           |  37 ++++++++++++++
 7 files changed, 195 insertions(+), 11 deletions(-)
 create mode 100755 t/t3434-rebase-i18n.sh
 create mode 100644 t/t3434/ISO8859-1.txt
 create mode 100644 t/t3434/eucJP.txt

Range-diff against v5:
 1:  b3d6c4e720 =  1:  9f83d4533b t0028: eliminate non-standard usage of printf
 2:  fe63a6bc44 =  2:  a9adb3d061 configure.ac: define ICONV_OMITS_BOM if necessary
 3:  30f15075c4 =  3:  c41046e717 t3900: demonstrate git-rebase problem with multi encoding
 4:  17165b81e5 =  4:  0ab92e7999 sequencer: reencode to utf-8 before arrange rebase's todo list
 5:  40fa759492 =  5:  23f9de4527 sequencer: reencode revert/cherry-pick's todo list
 6:  ed6cfab5d2 =  6:  f04a9d1698 sequencer: reencode squashing commit's message
 7:  def9adf97e !  7:  4dfdd4b83e sequencer: reencode old merge-commit message
    @@ sequencer.c: static int do_merge(struct repository *r,
      		int len;
      
     
    - ## t/t3433-rebase-i18n.sh (new) ##
    + ## t/t3434-rebase-i18n.sh (new) ##
     @@
     +#!/bin/sh
     +#
    @@ t/t3433-rebase-i18n.sh (new)
     +. ./test-lib.sh
     +
     +compare_msg () {
    -+	iconv -f "$2" -t "$3" "$TEST_DIRECTORY/t3433/$1" >expect &&
    ++	iconv -f "$2" -t "$3" "$TEST_DIRECTORY/t3434/$1" >expect &&
     +	git cat-file commit HEAD >raw &&
     +	sed "1,/^$/d" raw >actual &&
     +	test_cmp expect actual
    @@ t/t3433-rebase-i18n.sh (new)
     +test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '
     +	git switch -c merge-eucJP-UTF-8 first &&
     +	git config i18n.commitencoding eucJP &&
    -+	git merge -F "$TEST_DIRECTORY/t3433/eucJP.txt" second &&
    ++	git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
     +	git config i18n.commitencoding UTF-8 &&
     +	git rebase --rebase-merges master &&
     +	compare_msg eucJP.txt eucJP UTF-8
    @@ t/t3433-rebase-i18n.sh (new)
     +test_expect_failure 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP' '
     +	git switch -c merge-eucJP-ISO-2022-JP first &&
     +	git config i18n.commitencoding eucJP &&
    -+	git merge -F "$TEST_DIRECTORY/t3433/eucJP.txt" second &&
    ++	git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
     +	git config i18n.commitencoding ISO-2022-JP &&
     +	git rebase --rebase-merges master &&
     +	compare_msg eucJP.txt eucJP ISO-2022-JP
    @@ t/t3433-rebase-i18n.sh (new)
     +
     +test_done
     
    - ## t/t3433/eucJP.txt (new) ##
    - Binary files /dev/null and t/t3433/eucJP.txt differ
    + ## t/t3434/eucJP.txt (new) ##
    + Binary files /dev/null and t/t3434/eucJP.txt differ
 8:  2e95ca57d2 !  8:  28e82d6394 sequencer: reencode commit message for am/rebase --show-current-patch
    @@ sequencer.c: static int make_patch(struct repository *r,
      		res |= write_message(subject, strlen(subject), buf.buf, 1);
      		unuse_commit_buffer(commit, commit_buffer);
     
    - ## t/t3433-rebase-i18n.sh ##
    -@@ t/t3433-rebase-i18n.sh: test_expect_failure 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP
    + ## t/t3434-rebase-i18n.sh ##
    +@@ t/t3434-rebase-i18n.sh: test_expect_failure 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP
      	compare_msg eucJP.txt eucJP ISO-2022-JP
      '
      
    @@ t/t3433-rebase-i18n.sh: test_expect_failure 'rebase --rebase-merges update encod
     +		echo for-conflict >two.t &&
     +		git add two.t &&
     +		git config i18n.commitencoding $old &&
    -+		git commit -F "$TEST_DIRECTORY/t3433/$msgfile" &&
    ++		git commit -F "$TEST_DIRECTORY/t3434/$msgfile" &&
     +		git config i18n.commitencoding $new &&
     +		test_must_fail git rebase -m master &&
     +		test -f .git/rebase-merge/message &&
    @@ t/t3433-rebase-i18n.sh: test_expect_failure 'rebase --rebase-merges update encod
     +
      test_done
     
    - ## t/t3433/ISO8859-1.txt (new) ##
    - Binary files /dev/null and t/t3433/ISO8859-1.txt differ
    + ## t/t3434/ISO8859-1.txt (new) ##
    + Binary files /dev/null and t/t3434/ISO8859-1.txt differ
 9:  860dee65f4 !  9:  78daf050de sequencer: fallback to sane label in making rebase todo list
    @@ sequencer.c: static int make_script_with_merges(struct pretty_print_context *pp,
      		/* label the tips of merged branches */
      		for (; to_merge; to_merge = to_merge->next) {
     
    - ## t/t3433-rebase-i18n.sh ##
    -@@ t/t3433-rebase-i18n.sh: test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '
    + ## t/t3434-rebase-i18n.sh ##
    +@@ t/t3434-rebase-i18n.sh: test_expect_success 'rebase --rebase-merges update encoding eucJP to UTF-8' '
      	compare_msg eucJP.txt eucJP UTF-8
      '
      
    @@ t/t3433-rebase-i18n.sh: test_expect_success 'rebase --rebase-merges update encod
     +test_expect_success 'rebase --rebase-merges update encoding eucJP to ISO-2022-JP' '
      	git switch -c merge-eucJP-ISO-2022-JP first &&
      	git config i18n.commitencoding eucJP &&
    - 	git merge -F "$TEST_DIRECTORY/t3433/eucJP.txt" second &&
    + 	git merge -F "$TEST_DIRECTORY/t3434/eucJP.txt" second &&
-- 
2.24.0.164.g78daf050de.dirty


  parent reply	other threads:[~2019-11-11  6:04 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  9:26 [PATCH 0/3] Linux with musl libc improvement Doan Tran Cong Danh
2019-10-31  9:26 ` [PATCH 1/3] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-10-31 17:41   ` Jeff King
2019-11-01  1:33     ` Danh Doan
2019-10-31 19:50   ` brian m. carlson
2019-10-31  9:26 ` [PATCH 2/3] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-10-31 18:11   ` Jeff King
2019-10-31 20:02     ` brian m. carlson
2019-11-01  1:40     ` Danh Doan
2019-10-31  9:26 ` [PATCH 3/3] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-10-31 10:38   ` Johannes Schindelin
2019-10-31 19:26     ` Jeff King
2019-11-01  4:49       ` Danh Doan
2019-11-01  8:25 ` [PATCH v2 0/3] Linux with musl libc improvement Doan Tran Cong Danh
2019-11-01  8:25   ` [PATCH v2 1/3] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-11-01 16:54     ` Jeff King
2019-11-01  8:25   ` [PATCH v2 2/3] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-11-01 16:56     ` Jeff King
2019-11-02  0:43       ` Danh Doan
2019-11-01  8:25   ` [PATCH v2 3/3] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-11-01 16:59     ` Jeff King
2019-11-02  1:02       ` Danh Doan
2019-11-02 12:20         ` Danh Doan
2019-11-05  8:00         ` Jeff King
2019-11-06  1:30           ` Junio C Hamano
2019-11-06  4:03             ` Jeff King
2019-11-06 10:03               ` Danh Doan
2019-11-07  5:56                 ` Jeff King
2019-11-06  9:19 ` [PATCH v3 0/8] Correct internal working and output encoding Doan Tran Cong Danh
2019-11-06  9:19   ` [PATCH v3 1/8] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 2/8] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 3/8] t3900: demonstrate git-rebase problem with multi encoding Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 4/8] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 5/8] sequencer: reencode revert/cherry-pick's " Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 6/8] sequencer: reencode squashing commit's message Doan Tran Cong Danh
2019-11-06  9:20   ` [PATCH v3 7/8] sequencer: reencode old merge-commit message Doan Tran Cong Danh
2019-11-06 15:39     ` Eric Sunshine
2019-11-06  9:20   ` [PATCH v3 8/8] sequencer: reencode commit message for am/rebase --show-current-patch Doan Tran Cong Danh
2019-11-07  2:56 ` [PATCH v4 0/8] Correct internal working and output encoding Doan Tran Cong Danh
2019-11-07  2:56   ` [PATCH v4 1/8] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-11-07  2:56   ` [PATCH v4 2/8] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-11-07  6:18     ` Junio C Hamano
2019-11-07  2:56   ` [PATCH v4 3/8] t3900: demonstrate git-rebase problem with multi encoding Doan Tran Cong Danh
2019-11-07  6:02     ` Jeff King
2019-11-07  6:48       ` Danh Doan
2019-11-07  8:02         ` Jeff King
2019-11-07 10:51           ` Danh Doan
2019-11-11  8:22             ` Jeff King
2019-11-07  2:56   ` [PATCH v4 4/8] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-11-07  6:04     ` Jeff King
2019-11-07  2:56   ` [PATCH v4 5/8] sequencer: reencode revert/cherry-pick's " Doan Tran Cong Danh
2019-11-07  6:06     ` Jeff King
2019-11-07  2:56   ` [PATCH v4 6/8] sequencer: reencode squashing commit's message Doan Tran Cong Danh
2019-11-07  6:15     ` Jeff King
2019-11-07  2:56   ` [PATCH v4 7/8] sequencer: reencode old merge-commit message Doan Tran Cong Danh
2019-11-07  2:56   ` [PATCH v4 8/8] sequencer: reencode commit message for am/rebase --show-current-patch Doan Tran Cong Danh
2019-11-07  6:32     ` Jeff King
2019-11-07  7:48       ` Danh Doan
2019-11-07  8:03         ` Jeff King
2019-11-07 16:32           ` Danh Doan
2019-11-08  9:43 ` [PATCH v5 0/9] Improve odd encoding integration Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 1/9] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 2/9] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 3/9] t3900: demonstrate git-rebase problem with multi encoding Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 4/9] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 5/9] sequencer: reencode revert/cherry-pick's " Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 6/9] sequencer: reencode squashing commit's message Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 7/9] sequencer: reencode old merge-commit message Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 8/9] sequencer: reencode commit message for am/rebase --show-current-patch Doan Tran Cong Danh
2019-11-08  9:43   ` [PATCH v5 9/9] sequencer: fallback to sane label in making rebase todo list Doan Tran Cong Danh
2019-11-11  1:22   ` [PATCH v5 0/9] Improve odd encoding integration Junio C Hamano
2019-11-11  4:02   ` Junio C Hamano
2019-11-11  4:43     ` Danh Doan
2019-11-11  6:14     ` Junio C Hamano
2019-11-11  6:03 ` Doan Tran Cong Danh [this message]
2019-11-11  6:03   ` [PATCH v6 1/9] t0028: eliminate non-standard usage of printf Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 2/9] configure.ac: define ICONV_OMITS_BOM if necessary Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 3/9] t3900: demonstrate git-rebase problem with multi encoding Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 4/9] sequencer: reencode to utf-8 before arrange rebase's todo list Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 5/9] sequencer: reencode revert/cherry-pick's " Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 6/9] sequencer: reencode squashing commit's message Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 7/9] sequencer: reencode old merge-commit message Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 8/9] sequencer: reencode commit message for am/rebase --show-current-patch Doan Tran Cong Danh
2019-11-11  6:03   ` [PATCH v6 9/9] sequencer: fallback to sane label in making rebase todo list Doan Tran Cong Danh
2019-11-11  8:39     ` Jeff King
2019-11-11 16:22       ` Phillip Wood
2019-11-11 18:26     ` Johannes Schindelin
2019-11-12  4:17       ` Junio C Hamano
2019-11-11  8:40   ` [PATCH v6 0/9] sequencer: handle other encoding better Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1573452046.git.congdanhqx@gmail.com \
    --to=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).