diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-01-13 17:46:09 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2022-01-13 17:46:09 +0100 |
commit | 035c856c2cbbad2b45252ec8c065c3a9e7eefa65 (patch) | |
tree | c584b11ba2e7dda007125029e937e64145840b15 /tools/changelog.sh | |
parent | 805427e06bc0549c7b9a4f50d3e39bbf68043f16 (diff) | |
download | zsh-035c856c2cbbad2b45252ec8c065c3a9e7eefa65.tar.gz zsh-035c856c2cbbad2b45252ec8c065c3a9e7eefa65.tar.bz2 zsh-035c856c2cbbad2b45252ec8c065c3a9e7eefa65.zip |
fix: get branch name first in `omz version` and changelog
Diffstat (limited to 'tools/changelog.sh')
-rwxr-xr-x | tools/changelog.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/changelog.sh b/tools/changelog.sh index 86774a7ea..49532a4a4 100755 --- a/tools/changelog.sh +++ b/tools/changelog.sh @@ -395,12 +395,12 @@ function main { # Get the first version name: # 1) try tag-like version, or - # 2) try name-rev, or - # 3) try branch name, or + # 2) try branch name, or + # 3) try name-rev, or # 4) try short hash version=$(command git describe --tags $until 2>/dev/null) \ - || version=$(command git name-rev --no-undefined --name-only --exclude="remotes/*" $until 2>/dev/null) \ || version=$(command git symbolic-ref --quiet --short $until 2>/dev/null) \ + || version=$(command git name-rev --no-undefined --name-only --exclude="remotes/*" $until 2>/dev/null) \ || version=$(command git rev-parse --short $until 2>/dev/null) # Get commit list from $until commit until $since commit, or until root commit if $since is unset |