~~~~~~~~~~~~~~~~~~~~~~~~~~
Features & Enhancements:
- Add new ``--keep-existing`` option for ``ksconf combine`` to preserve certain files that exist within the target directory but not within any source.
Similarly the new ``--disable-cleanup`` option will prevent any files from being removed.
This is useful, for example if using ``ksconf combine`` to write apps into ``deployment-apps`` where Splunk automatically creates a local ``app.conf`` file, and the deletion and recreation of the file can result in unnecessary app re-deployments.
These new options can be used together; for example, one useful pattern is to use ``--disable-cleanup`` to block all removals while perfecting/testing ``--keep-existing`` patterns.
- Add support for previewing stanza changes with ``ksconf promote`` by combining ``--stanza X`` and ``--summary`` options at the same time. Thanks to guilhemmarchand for the suggestion. (`89 <https://github.com/Kintyre/ksconf/issues/89>`__)
- New CLI args for ``ksconf diff``.
(1) New ``--detail`` option to specify how to handle certain 'replace' levels which impacts the way certain changes are represented.
(2) New ``--format json`` for a more parsable output format.
Note: This json format shouldn't be considered stable at this time. If you have ideas about how this could be used, please reach out.
- Allow enabling/disabling TTY colors via environmental variable. The new ``--disable-color`` option will disable color, or to disable more widely, add something like ``export KSCONF_TTY_COLOR=off`` to your bashrc profile or Windows environment variables.
Bug fixes:
- Fixed layer detection bugs for ``dir.d`` mode for layers. (1) Layers that weren't immediately under the source directory were not detected, and
(2) layers existing beyond a symlink were not detected.
This change targeted for ``ksconf combine`` but may fix other similar issues.
- Fixed `91 <https://github.com/Kintyre/ksconf/issues/91>`__. where ``ksconf diff`` wouldn't correctly handle empty stanzas in the second input file
(Reversing the order would sometimes worked to avoid the issue).
This was resolved by enabling some improved empty stanza handling in the conf comparison algorithms that were updated back in 0.7.10, but never globally applied. This has been resolved.
Documentation improvements
- New git tip: Use a ``gitdir:`` pointer to relocate the ``.git`` dir to avoid replicating it when a directory like ``master-apps`` is a git working copy.
- Additional quick use case in the cheatsheet page.
Demonstrate how ksconf could be used to list all "apps" present on a deployment server from the ``serverclass.conf`` file.
API Change:
- Replaced use of ``match_bwlist()`` with the :py:class:`~ksconf.filter.FiltedListSplunkGlob` class, which allows old code to be cleaned up and technically, there's some expanded capabilities because of this (like many filters now supporting ``file://filter.txt`` type syntax, but this hasn't been documented and may be left as an Easter egg; because who reads changelogs?)
- Dropped ``tty_color()`` which had already been replaced with the ``TermColor`` class.