Skip to content
Snippets Groups Projects
Commit 626d7c01 authored by Abderrahim Kitouni's avatar Abderrahim Kitouni
Browse files

fix the encoding bug correctly

parent a3914d6a
No related branches found
No related tags found
No related merge requests found
......@@ -609,8 +609,7 @@
"%s must be followed by space not %s" % (ENCODING_ID, text[count])
count += 1
self._encoding = text[count:].split("\n", 1)[0]
while text[count] != "\n":
count += 1
count += len(self._encoding) + 1
count += 1
self._message = text[count:]
self._needs_parsing = False
......
......@@ -359,7 +359,7 @@
commit_data += 'author ' + commit['author'] + "\n"
commit_data += 'committer ' + commit['committer'] + "\n"
if 'encoding' in commit:
commit_data += 'encoding ' + commit['encoding']
commit_data += 'encoding ' + commit['encoding'] + "\n"
commit_data += "\n"
commit_data += commit['message']
sha = self.write_object('commit', commit_data)
......
......@@ -17,7 +17,7 @@
at: 0/4
updating working directory
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
@ changeset: 3:4194aac3187933e5859d85d8f572234e41f79f3d
@ changeset: 3:983a70eb26960008c2d503306d2c2b047e1b2c0c
| tag: master
| tag: default/master
| tag: tip
......@@ -31,7 +31,7 @@
| extra: branch=default
| extra: committer=test <test@example.org> 1167609613 0
| extra: encoding=latin-1
| extra: message=\nadd d\xe9lt\xe0\n
| extra: message=add d\xe9lt\xe0\n
| description:
| add déltà
|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment