Commit fee065a0698a177811998580700a21214b69ab18

nulltoken 2010-12-11T15:34:37

Made possible to parse a person with no specified timezone offset.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/person.c b/src/person.c
index 8372d6e..96dc5d2 100644
--- a/src/person.c
+++ b/src/person.c
@@ -90,6 +90,12 @@ int git_person__parse_timezone_offset(const char *buffer, int *offset_out)
 
 	offset_start = buffer + 1;
 
+	if (*offset_start == '\n')
+	{
+		*offset_out = 0;
+		return GIT_SUCCESS;
+	}
+
 	if (offset_start[0] != '-' && offset_start[0] != '+')
 		return GIT_EOBJCORRUPTED;