diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-04-17 10:40:04 -0500 |
---|---|---|
committer | Joshua Watt <JPEWhacker@gmail.com> | 2023-04-17 11:40:36 -0500 |
commit | c015c1aa845f8db8f386eefa3181e2da4b3c007a (patch) | |
tree | ac38cd0c036fab75408056e29586086844a5a253 /tools/test-setup.sh | |
parent | 8faa62d1e241bab5d0d8781e76c836cc3ce8b45d (diff) | |
download | zuul-c015c1aa845f8db8f386eefa3181e2da4b3c007a.tar.gz |
gerrit: Handle case where commit has no parents
If a commit has no parents (e.g. the first commit in a repository), the
HTTP request to gerrit to the revision files endpoint must not specify
the parent=1 query parameter. Otherwise, gerrit will return an HTTP 400
error with the message 'invalid parent number: 1'.
Explicitly check for this by examining if any parents are present for
the current revision before adding the query parameter
Change-Id: I3f93899dc79ebc716223ecc6f5adecd0f1ce9b3e
Diffstat (limited to 'tools/test-setup.sh')
0 files changed, 0 insertions, 0 deletions