diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e1de3c8..b477cd02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ _When adding new entries to the changelog, please include issue/PR numbers where ## Unreleased +- diff/show: Faster output for some large repositories (varies wildly) [#1038](https://github.com/koordinates/kart/issues/1038) - show: Added `--no-sort-keys` option to disable sorting of features by name/PK. Previously added to `diff` only +- show: Added `--add-feature-count-estimate` option to add a feature count estimate to `json-lines` output. Previously added to `diff` only ## 0.16.1 diff --git a/kart/show.py b/kart/show.py index 5983bbaa..618d1658 100644 --- a/kart/show.py +++ b/kart/show.py @@ -65,6 +65,16 @@ "Otherwise, the feature count will be approximated with varying levels of accuracy." ), ) +@click.option( + "--add-feature-count-estimate", + default=None, + type=click.Choice(diff_estimation.ACCURACY_CHOICES), + help=( + "Adds a feature count estimate to this diff (used with `--output-format json-lines` only.) " + "The estimate will be calculated while the diff is being generated, and will be added to " + "the stream when it is ready. If the estimate is not ready before the process exits, it will not be added." + ), +) @click.option( "--diff-files", is_flag=True, @@ -109,6 +119,7 @@ def show( output_path, exit_code, only_feature_count, + add_feature_count_estimate, diff_files, args, diff_format=DiffFormat.FULL, @@ -161,6 +172,7 @@ def show( delta_filter=delta_filter, target_crs=crs, sort_keys=sort_keys, + diff_estimate_accuracy=add_feature_count_estimate, ) diff_writer.full_file_diffs(diff_files) diff_writer.include_target_commit_as_header()