From de6463fbeea7b7b1e4acfa6ef55835376540a73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Mon, 16 Jun 2014 16:27:57 +0200 Subject: [PATCH] Fixed git-changelog errors on first usage --- bin/git-changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/git-changelog b/bin/git-changelog index f109dcc..1543caa 100755 --- a/bin/git-changelog +++ b/bin/git-changelog @@ -28,7 +28,8 @@ DATE=`date +'%Y-%m-%d'` HEAD="\n$TAG / $DATE\n==================\n\n" if $LIST; then - version=$(git describe --tags --abbrev=0 $(git rev-list --tags --max-count=1)) + lasttag=$(git rev-list --tags --max-count=1 2>/dev/null) + version=$(git describe --tags --abbrev=0 $lasttag 2>/dev/null) if test -z "$version"; then git log $GIT_LOG_OPTS --pretty="format: * %s" else