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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user