diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-02 11:39:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-02 13:17:08 +0100 |
commit | 6ad2ec4e98157618a9ff5b9097d84b45d16c7038 (patch) | |
tree | 36ac1ca8f68b3a446dbcce87a0bebe05366b1443 /logerrit | |
parent | 788ffc0360e44c54947bdead6d1eb368e5283915 (diff) |
fix get_SHA_for_change in logerrit script
after
commit 02b5d09c0dab1621ce23f9a8df45fa1628be3ece
tdf#105204 fix shellcheck warnings in logerrit
the previous get_SHA_for_change returned a URL with a leading space,
which was previously implicitly stripped. Adding quotes prevents that
stripping, so we need to explicitly strip here
Change-Id: I5b303f6ca5b1dc7d2a369afc2c52830b1b9586eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89816
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'logerrit')
-rwxr-xr-x | logerrit | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5,7 +5,7 @@ GERRITHOST=logerrit GERRITURL="ssh://$GERRITHOST/core" get_SHA_for_change() { - SHA=$(ssh "${GERRITHOST?}" gerrit query --all-approvals change:"$1"|grep ref|tail -1|cut -d: -f2) + SHA=$(ssh "${GERRITHOST?}" gerrit query --all-approvals change:"$1" | grep ref | tail -1 | cut -d: -f2 | sed 's/^ *//') } submit() { |