Skip to content

Commit

Permalink
Merge pull request #1705 from mumez/feature/MultibyteCommitMessageFix
Browse files Browse the repository at this point in the history
Feature/multibyte commit message fix
  • Loading branch information
tesonep authored Jun 30, 2023
2 parents 03c6413 + 7a59b2c commit 53eb721
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Iceberg-Libgit/IceGitIndex.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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: [ #() ]
Expand Down
9 changes: 9 additions & 0 deletions Iceberg-Tests/IceGitCommitMessageTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 53eb721

Please sign in to comment.