Add a resource for retrieving diffs
Review Request #8920 — Created May 5, 2017 and submitted
The
DiffResource
, available at
a/projects/<projectName>/commits/<sha>/diff/
, yields the diff of the
commit with the given sha. Due to limitations within the JGit library,
we are only able to compute diffs for commits which have a single
parent.
Hit the API and saw the diff returned.
- Change Summary:
-
Judicious use of
final
. - Description:
-
The
DiffResource
, available at~ a/projects/<projectName>/commits/<sha>/gerrit-reviewboard~diff/
,~ yields the diff of the commit with the given sha. Due to limitations ~ within the JGit library, we are only able to compute diffs for commits ~ which have a single parent. ~ a/projects/<projectName>/commits/<sha>/diff/
, yields the diff of the~ commit with the given sha. Due to limitations within the JGit library, ~ we are only able to compute diffs for commits which have a single ~ parent.
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
- Change Summary:
-
Return diffs as
text/x-patch
instead of JSON strings.
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.
- Change Summary:
-
Judicious use of
final
.
Checks run (3 succeeded)
JSHint
passed.
PEP8 Style Checker
passed.
Pyflakes
passed.