summaryrefslogtreecommitdiffstats
path: root/util/release/genrelnotes
diff options
context:
space:
mode:
Diffstat (limited to 'util/release/genrelnotes')
-rwxr-xr-xutil/release/genrelnotes5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/release/genrelnotes b/util/release/genrelnotes
index 54933b0a59f6..5bd1a965e5da 100755
--- a/util/release/genrelnotes
+++ b/util/release/genrelnotes
@@ -47,6 +47,11 @@ if [ "$1" == "--help" ] || [ -z "$1" ] || [ -z "$2" ]; then
else
OLD_GIT_VERSION="$1"
NEW_GIT_VERSION="$2"
+ if [ "$OLD_GIT_VERSION" = "HEAD" -o "$NEW_GIT_VERSION" = "HEAD" ]; then
+ echo "Error: using HEAD as a reference doesn't work"
+ echo
+ exit 1
+ fi
TOTAL_COMMITS=$(git log --pretty=oneline \
"${OLD_GIT_VERSION}..${NEW_GIT_VERSION}" 2>/dev/null | wc -l)
fi