Created
October 13, 2009 18:04
-
-
Save joelreymont/209409 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff | |
diff --git a/dulwich/objects.py b/dulwich/objects.py | |
index bd70800..d901825 100644 | |
--- a/dulwich/objects.py | |
+++ b/dulwich/objects.py | |
@@ -561,6 +561,17 @@ class Commit(ShaFile): | |
assert text[count] == ' ', "Invalid commit object, " \ | |
"author information must be followed by space not %s" % text[c | |
count += 1 | |
+ # Tyler ([email protected]> <none@none> 1222014536 +0200 | |
+ if text[count] == '<': | |
+ while text[count] != '>': | |
+ assert text[count] != '\n', "Malformed author information" | |
+ self._author += text[count] | |
+ count += 1 | |
+ self._author_raw = self._author | |
+ count += 1 | |
+ assert text[count] == ' ', "Invalid commit object, " \ | |
+ "author information must be followed by space not %s" % te | |
+ count += 1 | |
self._author_raw += ' ' + text[count:].split(" ", 1)[0] | |
self._author_time = int(text[count:].split(" ", 1)[0]) | |
while text[count] != ' ': | |
@@ -589,6 +600,17 @@ class Commit(ShaFile): | |
assert text[count] == ' ', "Invalid commit object, " \ | |
"commiter information must be followed by space not %s" % text | |
count += 1 | |
+ # Tyler ([email protected]> <none@none> 1222014536 +0200 | |
+ if text[count] == '<': | |
+ while text[count] != '>': | |
+ assert text[count] != '\n', "Malformed author information" | |
+ self._author += text[count] | |
+ count += 1 | |
+ self._author_raw = self._author | |
+ count += 1 | |
+ assert text[count] == ' ', "Invalid commit object, " \ | |
+ "author information must be followed by space not %s" % te | |
+ count += 1 | |
self._committer_raw += ' ' + text[count:].split(" ", 1)[0] | |
self._commit_time = int(text[count:].split(" ", 1)[0]) | |
while text[count] != ' ': |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment