Skip to content

Commit 50deaca

Browse files
authored
feat: Add additional logging when the isClean check fails. (#71)
1 parent e0b147b commit 50deaca

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/kotlin/git/semver/plugin/scm/GitProvider.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,23 @@ internal class GitProvider(private val settings: SemverSettings) {
103103
return true
104104
}
105105
logger.info("The Git repository is dirty. (Check: {})", settings.noDirtyCheck)
106+
val changes = mapOf(
107+
"added" to status.added.size,
108+
"changed" to status.changed.size,
109+
"removed" to status.removed.size,
110+
"missing" to status.missing.size,
111+
"modified" to status.modified.size,
112+
"conflicting" to status.conflicting.size,
113+
"untracked" to status.untracked.size
114+
)
115+
logger.info("Changes: {}", changes.filter { it.value > 0 }.keys.joinToString(", "))
106116
logger.debug("added: {}", status.added)
107117
logger.debug("changed: {}", status.changed)
108118
logger.debug("removed: {}", status.removed)
109119
logger.debug("conflicting: {}", status.conflicting)
110120
logger.debug("missing: {}", status.missing)
111121
logger.debug("modified: {}", status.modified)
122+
logger.debug("untracked: {}", status.untracked)
112123
return settings.noDirtyCheck
113124
}
114125

0 commit comments

Comments
 (0)