git-annex/CmdLine
Joey Hess 1d1054faa6
added -z
Added -z option to git-annex commands that use --batch, useful for
supporting filenames containing newlines.

It only controls input to --batch, the output will still be line delimited
unless --json or etc is used to get some other output. While git often
makes -z affect both input and output, I don't like trying them together,
and making it affect output would have been a significant complication,
and also git-annex output is generally not intended to be machine parsed,
unless using --json or a format option.

Commands that take pairs like "file key" still separate them with a space
in --batch mode. All such commands take care to support filenames with
spaces when parsing that, so there was no need to change it, and it would
have needed significant changes to the batch machinery to separate tose
with a null.

To make fromkey and registerurl support -z, I had to give them a --batch
option. The implicit batch mode they enter when not provided with input
parameters does not support -z as that would have complicated option
parsing. Seemed better to move these toward using the same --batch as
everything else, though the implicit batch mode can still be used.

This commit was sponsored by Ole-Morten Duesund on Patreon.
2018-09-20 16:11:47 -04:00
..
GitAnnex Added --accessedwithin matching option. 2018-08-01 15:34:03 -04:00
GitAnnexShell GIT_ANNEX_SHELL_APPENDONLY 2018-05-25 13:17:56 -04:00
Action.hs Fix bug introduced in version 6.20171018 that caused some commands to print out "ok" twice after processing a file. 2017-12-28 17:31:16 -04:00
Batch.hs added -z 2018-09-20 16:11:47 -04:00
GitAnnex.hs Added inprogress command for accessing files as they are being downloaded. 2017-12-28 11:46:39 -04:00
GitAnnexShell.hs GIT_ANNEX_SHELL_APPENDONLY 2018-05-25 13:17:56 -04:00
GitRemoteTorAnnex.hs move protocol version stuff to the Net free monad 2018-03-12 15:20:51 -04:00
GlobalSetter.hs mapM_ = sequence_ . map 2017-02-27 14:48:07 -04:00
Option.hs remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Seek.hs avoid duplicate add action for v6 unlocked modified file 2018-09-12 15:20:34 -04:00
Usage.hs initial export command 2017-08-29 15:10:01 -04:00