gitgerrit

Get file content of change using Gerrit API


Im using the Gerrit API (/changes/64/revisions/current/files/my_file/content) to access file content. Is there any way to get the "base" content of this file, the content which the change was based on?

I've tried using

/changes/64/revisions/0/files/my_file/content

but with no luck. Any ideas?


Solution

  • Maybe use the get-diff API, from there you can derive the original file content