From 69f4cf9852424c7f4128480b3c30044fca547b1f Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 29 May 2024 08:21:58 +1000 Subject: [PATCH] common.sh: don't duplicate reports of duplicated commits --- common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.sh b/common.sh index 1f66c13..7406e78 100644 --- a/common.sh +++ b/common.sh @@ -143,10 +143,11 @@ check_dups() name="$1" base="$2" sha="$3" + dlfile="$top_dir/duplicates/linus/$name" if [ "$base" = "HEAD" ]; then dfile="$top_dir/duplicates/next/$name" else - dfile="$top_dir/duplicates/linus/$name" + dfile="$dlfile" fi # if there is anything in this tree, then check for duplicates @@ -157,6 +158,9 @@ check_dups() dups=$(git cherry "$base" "$sha" | sed -n 's/^- //p' | xargs -r -n 1 "$tools_dir"/clog | sort) + if [ "$base" = "HEAD" ] && [ -f "$dlfile" ]; then + dups=$(printf '%s\n' "$dups" | comm -23 - "$dlfile") + fi if [ -z "$dups" ]; then rm -f "$dfile" elif ! [ -f "$dfile" ]; then -- 2.39.5