diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-11-12 16:15:07 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-11-12 16:19:39 +0100 |
commit | 101988c61a50e5a8094e5d90f37b75a28bd3ddeb (patch) | |
tree | 493a663f84f8fa58e10a0766eb839a8021d0360e /toolchain/musl/Config.in | |
parent | b7e81d210b403ab7fb2cad70a26e78d63f80b6ce (diff) | |
download | upstream-101988c61a50e5a8094e5d90f37b75a28bd3ddeb.tar.gz upstream-101988c61a50e5a8094e5d90f37b75a28bd3ddeb.tar.bz2 upstream-101988c61a50e5a8094e5d90f37b75a28bd3ddeb.zip |
scripts/getver.sh: prevent asking for negative rev-parse
With the case of asking an invalid version that is too big, getver.sh
might return an invalid output in the form of HEAD~-2260475641.
This is caused by BASE_REV - GET_REV using a negative number.
Prevent this by checking if BASE_REV - GET_REV actually return 0 or a
positive number and set REV variable accordingly. With the following
change, invalid revision number will result in unknown printed instead
of the invalid HEAD~-NUMBERS output.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 9e49e0a6c4535d345084cc62c594be5cad23b911)
Diffstat (limited to 'toolchain/musl/Config.in')
0 files changed, 0 insertions, 0 deletions