Keep options in a fixed order, and say which block a diff hunk is in
Options of a block (server options, a view, a zone) are listed and
written grouped by topic, alphabetical within a group, so the same
option is in the same place everywhere. Top-level statements keep the
order they were added in.
named.conf diffs add the enclosing blocks to each hunk header, like
git's function context: @@ -50,6 +49,8 @@ view "internal" {.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
73d97ecc0a
commit
b097e10bef
9 files changed
+326
-3
No files matched your search
@@ -335,5 +335,8 @@ func fileDiff(path string, old []byte, existed bool, new []byte, removed, secret
|
||||
if d != "" && !strings.HasSuffix(d, "\n") {
|
||||
d += "\n"
|
||||
}
|
||||
if strings.HasSuffix(path, ".conf") {
|
||||
d = labelHunks(d, string(old), string(new))
|
||||
}
|
||||
return d
|
||||
}
|
||||
Reference in new issue
Block a user