1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 12:46:13 +08:00

fix(changelog): go back to ignoring commits from merged branches

This commit is contained in:
Marc Cornellà 2021-10-26 18:26:02 +02:00
parent 9c8131e417
commit 140bfa8432
No known key found for this signature in database
GPG Key ID: 0314585E776A9C1B

View File

@ -401,17 +401,18 @@ function main {
# --format: [7-char hash]<field sep>[ref names]<field sep>[subject]<field sep>[body]
# --abbrev=7: force commit hashes to be 7 characters long
# --no-merges: merge commits are omitted
# --first-parent: commits from merged branches are omitted
local SEP="0mZmAgIcSeP"
local -a raw_commits
raw_commits=(${(0)"$(command git log -z \
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=7 \
--no-merges $range)"})
--no-merges --first-parent $range)"})
local raw_commit
local -a raw_fields
for raw_commit in $raw_commits; do
# Truncate list on versions with a lot of commits
if (( ++read_commits > 40 )); then
if [[ -z "$since" ]] && (( ++read_commits > 35 )); then
truncate=1
break
fi