Commit dc33b3d7 by Scott J. Goldman

Don't bail on parsing commits with an invalid timezone

git doesn't do that, and it's not something that's usually
actionable to fix. if you have a git repository with one bad
timezone in the history, it's too late to change it most likely.
parent cfbd08a5
......@@ -174,8 +174,10 @@ int git_signature__parse(git_signature *sig, const char **buffer_out,
tz_start = time_end + 1;
if ((tz_start[0] != '-' && tz_start[0] != '+') ||
git__strtol32(&offset, tz_start + 1, &tz_end, 10) < 0)
return signature_error("malformed timezone");
git__strtol32(&offset, tz_start + 1, &tz_end, 10) < 0) {
//malformed timezone, just assume it's zero
offset = 0;
}
hours = offset / 100;
mins = offset % 100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment