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

[PATCH v3 0/2] Update: fixed typos in commit message

From
AGAlexandr Miloslavskiy via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 24, 2019, 10:40 UTC
Message-ID
<pull.347.v3.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.347.v2.git.gitgitgadget@gmail.com>

Commit 1/2: t0028: fix test for UTF-16-LE-BOM Commit 2/2: t0028: add more tests Please refer to individual commit messages for more information.

Alexandr Miloslavskiy (2):
  t0028: fix test for UTF-16-LE-BOM
  t0028: add more tests
 t/t0028-working-tree-encoding.sh | 41 +++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)
base-commit: 4c86140027f4a0d2caaa3ab4bd8bfc5ce3c11c8a
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-347%2FSyntevoAlex%2F%230189_t0028_fixes-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-347/SyntevoAlex/#0189_t0028_fixes-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/347
Range-diff vs v2:
 1:  d717a60932 ! 1:  438ac961a5 t0028: fix test for UTF-16-LE-BOM
     @@ -3,15 +3,15 @@
          t0028: fix test for UTF-16-LE-BOM
      
          According to its name, the test is designed for UTF-16-LE-BOM.
     -    However, possibly due to copy&paste oversight, it was using UTF-32 file.
     +    However, possibly due to copy&paste oversight, it was using UTF-32.
      
     -    While the test succeeds (probably interprets extra \x00\x00 as embedded
     -    zero), I myself had an unrelated problem which caused the test to fail.
     +    While the test succeeds (extra \000\000 are interpreted as NUL),
     +    I myself had an unrelated problem which caused the test to fail.
          When analyzing the failure I was quite puzzled by the fact that the
          test is obviously bugged. And it seems that I'm not alone:
          https://public-inbox.org/git/CAH8yC8kSakS807d4jc_BtcUJOrcVT4No37AXSz=jePxhw-o9Dg@mail.gmail.com/T/#u
      
     -    This fix changes the test to follow its original intention.
     +    Fix the test to follow its original intention.
      
          Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
      
 2:  40e54cf5ce ! 2:  e4410274e6 t0028: add more tests
     @@ -2,9 +2,9 @@
      
          t0028: add more tests
      
     -    After I discovered that UTF-16-LE-BOM test was bugged and still
     -    succeeded, I decided that better tests are required. Possibly the best
     -    option here is to compare git results against hardcoded ground truth.
     +    After I discovered that UTF-16-LE-BOM test was bugged, I decided that
     +    better tests are required. Possibly the best option here is to compare
     +    git results against hardcoded ground truth.
      
          The new tests also cover more interesting chars where (ANSI != UTF-8).
      
     @@ -25,26 +25,26 @@
      +	orig_string="$2"
      +	expect_bytes="$3"
      +	
     -+	test_expect_success "Commit utf-8, checkout ${encoding}" '
     ++	test_expect_success "Commit UTF-8, checkout $encoding" '
      +		test_when_finished "git checkout HEAD -- .gitattributes" &&
      +		
     -+		test_ext="commit_utf8_checkout_${encoding}" &&
     -+		test_file="test.${test_ext}" &&
     ++		test_ext="commit_utf8_checkout_$encoding" &&
     ++		test_file="test.$test_ext" &&
      +		
     -+		# Commit as utf-8
     -+		echo "*.${test_ext} text working-tree-encoding=utf-8" >.gitattributes &&
     -+		printf "${orig_string}" >"${test_file}" &&
     -+		git add "${test_file}" &&
     ++		# Commit as UTF-8
     ++		echo "*.$test_ext text working-tree-encoding=UTF-8" >.gitattributes &&
     ++		printf "$orig_string" >$test_file &&
     ++		git add $test_file &&
      +		git commit -m "Test data" &&
      +
      +		# Checkout in tested encoding
     -+		rm "${test_file}" &&
     -+		echo "*.${test_ext} text working-tree-encoding=${encoding}" >.gitattributes &&
     -+		git checkout HEAD -- "${test_file}" &&
     ++		rm $test_file &&
     ++		echo "*.$test_ext text working-tree-encoding=$encoding" >.gitattributes &&
     ++		git checkout HEAD -- $test_file &&
      +		
      +		# Test
     -+		printf "${expect_bytes}" > "${test_file}.raw" &&
     -+		test_cmp_bin "${test_file}.raw" "${test_file}"
     ++		printf $expect_bytes >$test_file.raw &&
     ++		test_cmp_bin $test_file.raw $test_file
      +	'
      +}
      +
-- 
gitgitgadget
Previous: Alexandr MiloslavskiyNext: Alexandr Miloslavskiy via GitGitGadget
Message 13 of 18 in “t0028 fix test + more tests”
  1. 0/2 t0028 fix test + more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  2. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  3. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  4. 0/2 Update: fixed typos in commit messageAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  5. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  6. Torsten BögershausenSep 24, 2019
  7. Alexandr MiloslavskiySep 24, 2019
  8. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 23, 2019
  9. Torsten BögershausenSep 24, 2019
  10. Alexandr MiloslavskiySep 24, 2019
  11. Johannes SixtSep 24, 2019
  12. Alexandr MiloslavskiySep 24, 2019
  13. 0/2 Update: fixed typos in commit messageAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  14. 2/2 t0028: add more testsAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  15. Junio C HamanoSep 28, 2019
  16. Alexandr MiloslavskiySep 30, 2019
  17. 1/2 t0028: fix test for UTF-16-LE-BOMAlexandr Miloslavskiy via GitGitGadget, Sep 24, 2019
  18. Torsten BögershausenSep 26, 2019

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.