Simplify glob messages with many excluded files
If the list of excluded files is large, omit it so that we don't get
a huge wall of text when running benign builds.
Test: m nothing
Change-Id: I77511566574800916beb3b5f8c9a11fff0bc7b1a
diff --git a/ui/build/soong.go b/ui/build/soong.go
index cd20a4a..2ddd414 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -792,8 +792,10 @@
changedGlobNameMutex.Lock()
defer changedGlobNameMutex.Unlock()
changedGlobName = result.Pattern
- if len(result.Excludes) > 0 {
- changedGlobName += " (excluding " + strings.Join(result.Excludes, ", ") + ")"
+ if len(result.Excludes) > 2 {
+ changedGlobName += fmt.Sprintf(" (excluding %d other patterns)", len(result.Excludes))
+ } else if len(result.Excludes) > 0 {
+ changedGlobName += " (excluding " + strings.Join(result.Excludes, " and ") + ")"
}
}
}