[webkit-reviews] review denied: [Bug 199227] commit api should not return 'AmbiguousRevisionPrefix' if there is an exact revision match : [Attachment 372941] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 26 13:19:46 PDT 2019


Ryosuke Niwa <rniwa at webkit.org> has denied dewei_zhu at apple.com's request for
review:
Bug 199227: commit api should not return 'AmbiguousRevisionPrefix' if there is
an exact revision match
https://bugs.webkit.org/show_bug.cgi?id=199227

Attachment 372941: Patch

https://bugs.webkit.org/attachment.cgi?id=372941&action=review




--- Comment #3 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 372941
  --> https://bugs.webkit.org/attachment.cgi?id=372941
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372941&action=review

> Websites/perf.webkit.org/public/include/commit-log-fetcher.php:209
> +	       if ($rows[0]['commit_revision'] == $revision_prefix)
> +		   return $rows[0];

There is no guarantee that the first one would be an exact match.
It appears to me that we'd have to issue two queries one for the exact match or
another one for like.
Alternatively, you can generate a boolean based on exact equality of the
revision
and sort the results so that the exact match appear first.
As is there is no guarantee this would work.


More information about the webkit-reviews mailing list