Message ID | 1482184457-4147-1-git-send-email-trini@konsulko.com |
---|---|
State | Accepted |
Headers | show |
Series | post-receive.hook: Handle failure to find patch number | expand |
On Mon, 2016-12-19 at 16:54 -0500, Tom Rini wrote: > When pwclient info -h fails to come up with the number for the change > in > question it will exit with a non-zero exit code. This failure will > propagate upwards and exit the script there. Make our call to > get_patch_id or in true so that our script here will see an empty id > and > we continue on with the list. > > Signed-off-by: Tom Rini <trini@konsulko.com> Looks fine to me. Merged and backported to 'stable/2.0'. Reviewed-by: Stephen Finucane <stephen@that.guru> Stephen
diff --git a/tools/post-receive.hook b/tools/post-receive.hook index 42de90a3a7c2..e6b07ee9b9da 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -67,7 +67,7 @@ update_patches() { echo "E: failed to hash rev $rev." >&2 continue fi - id=$(get_patch_id $hash) + id=$(get_patch_id $hash || true) if [ -z "$id" ]; then echo "E: failed to find patch for rev $rev." >&2 continue
When pwclient info -h fails to come up with the number for the change in question it will exit with a non-zero exit code. This failure will propagate upwards and exit the script there. Make our call to get_patch_id or in true so that our script here will see an empty id and we continue on with the list. Signed-off-by: Tom Rini <trini@konsulko.com> --- tools/post-receive.hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)