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
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