Re: [Question] Complex textconv text
- Date: Fri, 14 Dec 2018 12:12:01 +0900
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: [Question] Complex textconv text
"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes:
> Hi all,
> I have a strange situation and need help with resolving funky characters in
> .git/config. My situation is this:
> [diff "*.dat"]
> textconv = enscribe-conv
> Basically this is a formatter for diff so that I can show structured binary
> data. The unquoted syntax of the format string is:
> Content is not really important. The issue is that git is reporting fatal:
> bad config line 2 in file .git/config when I escape the (, ), and |
That failure is understandable, as
The following escape sequences (beside `\"` and `\\`) are recognized:
`\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB)
and `\b` for backspace (BS). Other char escape sequences (including octal
escape sequences) are invalid.
is what Documentation/config.txt says. \(, \) and \| is not a way
to escape these letters from the .git/config parser (they do not
need to be escaped from .git/config parser)..
> I get syntax errors otherwise from the shell running the
> textconv. I have tried
> --format="-a1(A=-a1,-a16,-a32|P=-a1,-a32,-a16|=-a1,-d,a14),-a224", to no
textconv = enscribe-conv --format=\"-a1(A=...,-a224\"
We want to show the shell what you wrote so that pipes and parens
are inside a dq pair, but the .git/config language strips pair of
dq, so the .git/config language parser needs to be told that these
dq are not for it to eat.