ChangeNotesParser: Support out-of-order timestamps

Since Ic10584e PostReview may take an arbitrary timestamp, resulting
in possible timestamp skew, possibly even exceeding the slop window in
JGit. Take the maximum timestamp instead of just trusting the tip.

Change-Id: I37d62217f3f37edb469d9f7ab569d3957b70a663
This commit is contained in:
Dave Borowitz
2016-03-10 15:50:23 -05:00
parent 2443905d17
commit 15dbdddb18

View File

@@ -276,8 +276,10 @@ class ChangeNotesParser implements AutoCloseable {
// behavior.
}
if (lastUpdatedOn == null && updateTs) {
lastUpdatedOn = ts;
if (updateTs) {
if (lastUpdatedOn == null || ts.after(lastUpdatedOn)) {
lastUpdatedOn = ts;
}
}
}