aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2016-07-16 16:57:05 +0200
committerJonas Gorski <jonas.gorski@gmail.com>2016-07-16 20:50:56 +0200
commitefdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b (patch)
tree50999bbc80cebc389fd410c754686e8ff5962e93
parentb051ac76e83f2245f06fda852b0779f328d2954b (diff)
downloadupstream-efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b.tar.gz
upstream-efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b.tar.bz2
upstream-efdd3bf5fbab94b3f84e8a285e83ef36e39b3e8b.zip
scripts/getver.sh: fix older git versions from printing stuff to stdout
Older git versions seem output the original argument to stdout if there is no upstream, presumably because they try to do things with it internally. This can be prevented by passing --verify to it, which should be safe on newer git versions. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
-rwxr-xr-xscripts/getver.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index a65a6af228..e718485852 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -25,8 +25,8 @@ try_git() {
;;
*)
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
- ORIGIN="$(git rev-parse --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
- [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --symbolic-full-name master@{u} 2>/dev/null)"
+ ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
+ [ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
REV="$(git rev-list ${REBOOT}..$GET_REV | wc -l | awk '{print $1}')"
if [ -n "$ORIGIN" ]; then