config.txt: document behavior of backslashes in subsections
authorDave Borowitz <dborowitz@google.com>
Thu, 21 Dec 2017 13:10:42 +0000 (08:10 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Dec 2017 20:51:43 +0000 (12:51 -0800)
commit1feb061701463410647665c4848b6466bf7a97c6
treee33014076cd2f9fe0cced9e120bf6a159231e9ff
parent3013dff8662eae06457fe6e5348dfe2270810ab2
config.txt: document behavior of backslashes in subsections

Unrecognized escape sequences are invalid in values:

  $ git config -f - --list <<EOF
  [foo]
    bar = "\t\\\y\"\u"
  EOF
  fatal: bad config line 2 in standard input

But in subsection names, the backslash is simply dropped if the
following character does not produce a recognized escape sequence:

  $ git config -f - --list <<EOF
  [foo "\t\\\y\"\u"]
    bar = baz
  EOF
  foo.t\y"u.bar=baz

Although it would be nice for subsection names and values to have
consistent behavior, changing the behavior for subsection names is a
nonstarter since it would cause existing, valid config files to
suddenly be interpreted differently.

Signed-off-by: Dave Borowitz <dborowitz@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt