Documentation
¶
Overview ¶
Package pathoverlap provides a conflict.Analyzer that reports a conflict between two batches when the paths they change share a key. The key is a projection of the path chosen at construction: ByFile compares whole paths, so only batches touching the same file conflict; ByDirectory compares parent directories, so batches touching sibling files conflict too. It is the first analyzer to use the capability the extension contract unblocks: it takes only batch identity and resolves each batch's changed files itself through an injected changeset resolver, rather than depending on the controller to pre-compute them. A shared path key is the concrete notion of target overlap, so it reports entity.ConflictTypeTargetOverlap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByDirectory ¶
ByDirectory keys on the path's immediate parent directory: batches conflict when they change any files in the same directory, whether or not the files themselves are the same. Overlap by directory is strictly coarser than overlap by file — every file overlap is also a directory overlap. Paths at the repository root share the key ".".
func New ¶
New returns a conflict.Analyzer that flags an in-flight batch as conflicting when it changes a path whose key matches one the candidate batch changes, bound to the queue named in cfg. The resolver resolves each batch's changed files, and key selects the granularity of overlap. Panics if key is nil.