command/format: indicate in diff when adding an attribute forces replacement

This commit is contained in:
Frederic
2019-03-29 22:52:13 +01:00
committed by Martin Atkins
parent e893bae5da
commit 0f1f504c22
2 changed files with 59 additions and 0 deletions

View File

@@ -253,6 +253,9 @@ func (p *blockBodyDiffPrinter) writeAttrDiff(name string, attrS *configschema.At
switch {
case showJustNew:
p.writeValue(new, action, indent+2)
if p.pathForcesNewResource(path) {
p.buf.WriteString(p.color.Color(forcesNewResourceCaption))
}
default:
// We show new even if it is null to emphasize the fact
// that it is being unset, since otherwise it is easy to