-
Sylvain Defresne authored
Some bots run roll-dep.py and fail while generating the commit message with the following error: src/ios/third_party/material_components_ios/src: Rolling from 54fd1dac39 to 5aaf54801f fatal: ambiguous argument '54fd1dac3..5aaf54801': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' As "Rolling from 54fd1dac39 to 5aaf54801f" is printed, this mean that the bot was able to resolve both HEAD and roll_to before invoking this function, thus the corresponding hashes exists in the repository. It is unlikely that shortening the hash to just the first nine chars results in a collision, but there is no reason to use a short hash when invoking git anyway, so use a separate variable to construct the header of the commit with short hashes while invoking git with the full hashes. Also pass '--' after all the parameters to force git to interpret the hash range as a range and not as a path. This is a speculative fix. Change-Id: Iaa2888610dcf8e20f9edc115a719791d573b83ac Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2031104Reviewed-by:
Aaron Gable <agable@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
ae2b962c