- if [ "$base" = "HEAD" ] && [ -f "$dlfile" ]; then
- dups=$(printf '%s\n' "$dups" | comm -23 - "$dlfile")
+
+ if ! [ -z "$dups" ]; then
+ for o in $(get_branches "$name"); do
+ ol="$top_dir/duplicates/linus/$o"
+ if [ -f "$ol" ]; then
+ dups=$(printf '%s\n' "$dups" | comm -23 - "$ol")
+ fi
+ if [ -z "$dups" ]; then
+ break
+ fi
+ if ! [ "$base" = "HEAD" ]; then
+ continue
+ fi
+ ol="$top_dir/duplicates/linus/$name"
+ if [ -f "$ol" ]; then
+ dups=$(printf '%s\n' "$dups" | comm -23 - "$ol")
+ fi
+ if [ -z "$dups" ]; then
+ break
+ fi
+ oh="$top_dir/duplicates/next/$o"
+ if [ -f "$oh" ]; then
+ dups=$(printf '%s\n' "$dups" | comm -23 - "$oh")
+ fi
+ if [ -z "$dups" ]; then
+ break
+ fi
+ done