worktree: add -z option for list subcommand
commitd97eb302ea848ff6f8f9af50a176734930964b9a
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Thu, 31 Mar 2022 16:21:28 +0000 (31 16:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 31 Mar 2022 20:28:55 +0000 (31 13:28 -0700)
treef54f9c2e7c0f17e0db34a1c199617bcb071a1e92
parentdab1b7905d0b295f1acef9785bb2b9cbb0fdec84
worktree: add -z option for list subcommand

Add a -z option to be used in conjunction with --porcelain that gives
NUL-terminated output. As 'worktree list --porcelain' does not quote
worktree paths this enables it to handle worktree paths that contain
newlines.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2402-worktree-list.sh