From 8519b0daa861ddab8bd0213941b266c28f938730 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Fri, 17 Mar 2023 13:53:15 +0100 Subject: [PATCH] chore: simplify git diff command in format-changelog.sh --- scripts/rel/format-changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rel/format-changelog.sh b/scripts/rel/format-changelog.sh index 0bbcc28ea..528b3bdc9 100755 --- a/scripts/rel/format-changelog.sh +++ b/scripts/rel/format-changelog.sh @@ -117,7 +117,7 @@ fi while read -r file; do PRS+=("$file") -done < <(git diff --name-status "tags/${BASE_TAG}...HEAD" "${changes_dir[@]}" | grep -E '^A.*' | awk '{print $2}') +done < <(git diff --diff-filter=A --name-only "tags/${BASE_TAG}...HEAD" "${changes_dir[@]}") TEMPLATE_FEAT_CHANGES="$(section 'feat')" TEMPLATE_PERF_CHANGES="$(section 'perf')"