Re: [PATCH] worktree: add -z option for list subcommand
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 28, 2022, 17:16 UTC
- Message-ID
- <xmqqwnhe3o96.fsf@gitster.g>
- In-Reply-To
- <CAPig+cQF3y64bPN8h4XvAYGX-g0LZedh-cAM+JLKdW_DPAWJaw@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 6 quoted lines
>> Unless the original wasn't using quote_c_style() correctly and >> wasn't quoting its output, that is? > > That's the case. It is impossible without this patch since `git > worktree list --porcelain` does not call quote_c_style() for the > worktree path; it only calls quote_c_style() for the lock reason.
Yuck. That's an outright bug that we should fix. I do not think it makes "-z" unnecessary, but those who want to read from non-z output cannot sensibly do so with funny letters in their paths with today's output, and as long as quote_c_style() tweaks the output only when funny letters need to be quoted, those who are reading from today's non-z output will not be hurt, so let's fix that first or at the same time as we add "-z".
Thanks.