Re: [PATCH 5/6] fast-import: document C-style escapes for paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Sending again as plain text)

On Mar 28, 2024, at 01:21, Patrick Steinhardt <ps@xxxxxx> wrote:
> On Fri, Mar 22, 2024 at 12:03:47AM +0000, Thalia Archibald wrote:
>> 
>> diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
>> index 271bd63a10..4aa8ccbefd 100644
>> --- a/Documentation/git-fast-import.txt
>> +++ b/Documentation/git-fast-import.txt
>> @@ -630,18 +630,23 @@ in octal.  Git only supports the following modes:
>> In both formats `<path>` is the complete path of the file to be added
>> (if not already existing) or modified (if already existing).
>> 
>> -A `<path>` string must use UNIX-style directory separators (forward
>> -slash `/`), may contain any byte other than `LF`, and must not
>> -start with double quote (`"`).
>> +A `<path>` string may contain any byte other than `LF`, and must not
>> +start with double quote (`"`). It is interpreted as literal bytes
>> +without escaping.
> 
> Paths also mustn't start with a space in many cases, right?

It talks about starting with double quote, because that's what determines
whether it's parsed as a quoted or unquoted string.

Containing spaces is different. When unquoted, a path can only contain a space
if it's the last field on the line; that's all paths except the source paths of
filecopy and filerename. That note was already remarked in the filecopy and
filerename sections, but it would help to note it in the general <note> section,
so I've done that and clarified quoting in patch v2 5/8 (fast-import: improve
documentation for unquoted paths).

Thalia





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux