From 4ebcbeb4f2681884e9d4424c0c30cf156a70c24f Mon Sep 17 00:00:00 2001 From: Masashi Umezawa Date: Wed, 7 Jun 2023 21:37:20 +0900 Subject: [PATCH 1/2] Fixed IceGitIndex>>commitWithMessage:andParents: not to send unnecessary #utf8Encoded message --- Iceberg-Libgit/IceGitIndex.class.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceberg-Libgit/IceGitIndex.class.st b/Iceberg-Libgit/IceGitIndex.class.st index 37c3062d1e..b29dfd8dec 100644 --- a/Iceberg-Libgit/IceGitIndex.class.st +++ b/Iceberg-Libgit/IceGitIndex.class.st @@ -42,7 +42,7 @@ IceGitIndex >> commitWithMessage: message andParents: parentCommits [ index free. commitId := (LGitCommitBuilder of: self repositoryHandle) tree: (LGitTree of: self repositoryHandle fromId: indexTreeId); - message: message withUnixLineEndings utf8Encoded asString "FFI is expecting an string"; + message: message withUnixLineEndings "FFI is expecting an string"; parents: (self repositoryHandle isUnborn ifTrue: [ #() ] From 7a59b2cda4567f1563930c7c62731fbec513f9d8 Mon Sep 17 00:00:00 2001 From: Masashi Umezawa Date: Wed, 7 Jun 2023 21:57:33 +0900 Subject: [PATCH 2/2] Added IceGitCommitMessageTest>>testCommitWideString --- Iceberg-Tests/IceGitCommitMessageTest.class.st | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Iceberg-Tests/IceGitCommitMessageTest.class.st b/Iceberg-Tests/IceGitCommitMessageTest.class.st index d0f214eba7..a8a39dd12b 100644 --- a/Iceberg-Tests/IceGitCommitMessageTest.class.st +++ b/Iceberg-Tests/IceGitCommitMessageTest.class.st @@ -24,6 +24,15 @@ IceGitCommitMessageTest >> testCommitNullString [ ] +{ #category : #tests } +IceGitCommitMessageTest >> testCommitWideString [ + | msg | + msg := ZnUTF8Encoder new decodeBytes: (ByteArray readHexFrom: 'e38182e38184e38186'). "Japanese vowels a,i, and u - 'あいう'" + self repository commitWithMessage: msg. + self assert: self repository head commit comment equals: msg. + +] + { #category : #tests } IceGitCommitMessageTest >> testCommitWithEndingPesosSign [ "We used to have a problem that in some messages (depending of padding) the $ was added at the end"