On Thu, Dec 07, 2023 at 10:08:50AM +0100, Thomas Haller wrote: > Previously, the .json-nft file in git contains the output of `nft -j > list ruleset`. This is one long line and makes diffs harder to review. > > Instead, have the prettified .json-nft file committed to git. > > - the diff now operates on the prettified version. That means, it > compares essentially > > - `nft -j list ruleset | json-sanitize-ruleset.sh | json-pretty.sh` > - `cat "$TEST.json-nft" | json-pretty.sh` > > The script "json-diff-pretty.sh" is no longer used. It is kept > however, because it might be a useful for manual comparing files. > > Note that "json-sanitize-ruleset.sh" and "json-pretty.sh" are still > two separate scripts and called at different times. They also do > something different. The former mangles the JSON to account for changes > that are not stable (in the JSON data itself), while the latter only > pretty prints it. > > - when generating a new .json-nft dump file, the file will be updated to > use the new, prettified format, unless the file is in the old format > and needs no update. This means, with DUMPGEN=y, old style is preserved > unless an update becomes necessary. > > This requires "json-pretty.sh" having stable output, as those files are > committed to git. This is probably fine. > > Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx> Patch applied and pushed along with a bulk dump file conversion to pretty format. Thanks, Phil