]> dgit.raspbian.org Git - git-annex.git/commit
registerurl,unregisterurl: rework output and support --json
authorJoey Hess <joeyh@joeyh.name>
Mon, 14 Feb 2022 17:29:20 +0000 (13:29 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 14 Feb 2022 17:29:20 +0000 (13:29 -0400)
commit0edf01d7d40971c3e71c0f6147fca0560e263d89
tree0411ddce58916e4b719ea9da5730eb992371907c
parent291dc0d1a91f33805391c0d456e8311fb7c3bbf4
registerurl,unregisterurl: rework output and support --json

* registerurl, unregisterurl: Improved output when reading from stdin
  to be more like other batch commands.
* registerurl, unregisterurl: Added --json and --json-error-messages options.

Note that this did change the --batch output in a way that could possibly
break something that expected the old output to never change. I think it's
acceptable to break that because there has never been a guarantee of
unchanging output format except with --batch for most commands. The old
output was just really weird too!

One possible wart is that "git-annex registerurl" with no options now
seems to just hang, since it's waiting for stdin input. Before, it said
"registerurl (stdin)" which was clearer about what's happenening. But this
is a deprecated mode anyway, --batch makes clear what's happening. If
anything, this problem would be a reason to eventually remove the support
for reading from stdin w/o --batch.

Sponsored-by: Dartmouth College's Datalad project
CHANGELOG
Command/FromKey.hs
Command/RegisterUrl.hs
Command/UnregisterUrl.hs
doc/git-annex-registerurl.mdwn
doc/git-annex-unregisterurl.mdwn
doc/todo/--json_for_registerurl.mdwn
doc/todo/--json_for_registerurl/comment_1_68fd330b6f20ef2d56234a639a5323c4._comment