Ignore duplicate component in same repository if matches component in HEAD
As an extension to #84 (closed), if there's another branch in the same repository that claims to provide the same component as the current branch / HEAD, ignore that other branch. This situation can occur when an author is working on a feature or fix branch. If the author specifies one of the branch patterns in the playbook as HEAD and uses a glob pattern to match other branches, as in:
content: sources: - url: docs branches: [ HEAD, v* ]
In this case, the original branch may also get matched. This currently results in an error. Instead, the original branch should simply be ignored in this situation (or perhaps logged that it's being skipped in an info-level log message).
The workaround is to add an exclusion for the original branch. For example, assuming the current branch is named
v1.0-fixes based off of
content: sources: - url: docs branches: [ HEAD, v*, '!v1.0' ]
But this partially defeats the purpose of the HEAD reference.