140bfa84320d6f0a9c3b429c1c6be41878e60352

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

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

Diff

 1diff --git a/tools/changelog.sh b/tools/changelog.sh
 2index 13cfb95304eb3f4568f48b42036dad8b2e53750c..5c3159732a5e210b5e77e7b32bcef99cd81a8b2c 100755
 3--- a/tools/changelog.sh
 4+++ b/tools/changelog.sh
 5@@ -401,17 +401,18 @@ function main {
 6   # --format:       [7-char hash]<field sep>[ref names]<field sep>[subject]<field sep>[body]
 7   # --abbrev=7:     force commit hashes to be 7 characters long
 8   # --no-merges:    merge commits are omitted
 9+  # --first-parent: commits from merged branches are omitted
10   local SEP="0mZmAgIcSeP"
11   local -a raw_commits
12   raw_commits=(${(0)"$(command git log -z \
13     --format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=7 \
14-    --no-merges $range)"})
15+    --no-merges --first-parent $range)"})
16 
17   local raw_commit
18   local -a raw_fields
19   for raw_commit in $raw_commits; do
20     # Truncate list on versions with a lot of commits
21-    if (( ++read_commits > 40 )); then
22+    if [[ -z "$since" ]] && (( ++read_commits > 35 )); then
23       truncate=1
24       break
25     fi