diff --git a/go/extractor/gomodextractor.go b/go/extractor/gomodextractor.go index be52af59760..8dce96b6e6a 100644 --- a/go/extractor/gomodextractor.go +++ b/go/extractor/gomodextractor.go @@ -20,6 +20,11 @@ func (extraction *Extraction) extractGoMod(path string) error { path = normPath } + if extraction.OverlayChanges != nil && !extraction.OverlayChanges[path] { + // This go.mod did not change since the base was extracted + return nil + } + extraction.Lock.Lock() if extraction.SeenGoMods[path] { extraction.Lock.Unlock()