You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get a geojson diff to stdout for working-copy changes to a single dataset. There are 3 vector datasets in the repository.
$ kart statusOn branch mainChanges in working copy: (use "kart commit" to commit) (use "kart restore" to discard changes) road-centrelines-topo: feature: 1 updates
$ kart diff -o geojsonUsage: kart_cli diff [OPTIONS] [COMMIT_SPEC] [FILTERS]...Try 'kart_cli diff --help' for help.Error: Invalid value for --output: Need to specify a directory via --output for GeoJSON with more than one dataset
$ kart diff -o geojson road-centrelines-topoError: road-centrelines-topo is not a ref, commit or tree
$ kart diff -o geojson road-centrelines-topo:Error: road-centrelines-topo: is not a ref, commit or tree
$ kart diff -o geojson -- road-centrelines-topoError: road-centrelines-topo: is not a ref, commit or tree
$ kart diff -o geojson -- road-centrelines-topo:Error: road-centrelines-topo: is not a ref, commit or tree
$ kart diff -o geojson --output .
$ lsKART_README.txt demo.gpkg demo.gpkg-shm demo.gpkg-wal road-centrelines-topo.geojson
Expected behaviour
My changes are only to a single dataset, so there should be a way to return geojson from the diff without needing to write a file.
Version Info
OS: macOS
Version: v0.11.6.dev0
The text was updated successfully, but these errors were encountered:
Yes, it even works nearly as you were doing above: kart diff HEAD -o geojson road-centrelines-topo
The problem with kart diff and with kart show - and potentially other commands like commit - is that we don't understand -- properly. Click recognises it but hides it from us. Perhaps click applies some logic to it - maybe --aaa -- --bbb is parsed as option aaa and argument bbb.
@craigds fixed up kart log to understand --
It's not ideal in that it mostly bypasses click: it stops click from swallowing the --, and then we kind of get all the arguments in a big lump, instead of click sorting them out for us. It's then up to us to find the -- if present, and to separate them back into their argument types: commits and paths. But, perhaps we can't do much better: parsing the arguments in Git and now Kart is repository specific, since Git and now Kart checks to see if "road-centrelines-topo" is the name of a commit, or the name of a path. Anyway, I guess I need to pull that code out of log and figure out how to reuse it for diff, show, commit. I'll file a new bug.
Describe the bug
Trying to get a geojson diff to stdout for working-copy changes to a single dataset. There are 3 vector datasets in the repository.
Expected behaviour
My changes are only to a single dataset, so there should be a way to return geojson from the diff without needing to write a file.
Version Info
The text was updated successfully, but these errors were encountered: