Re: File path not escaped in warning message

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

 



Janusz Białobrzewski <jbialobr@xxxxx> writes:

> Here is output from linux:
>
> [janusz@mikrus JavaCommon]$ git config --add core.quotepath false
> [janusz@mikrus JavaCommon]$ git diff  --unified=3 -- "1ą.txt"
> warning: LF will be replaced by CRLF in 1<B1>.txt.
> The file will have its original line endings in your working directory.

I do not know offhand if the literal <B1> is the byte value you want
or not, but core.quotepath should not affect it.

The configuration is primarily about quoting paths that appear in
the header part in the diff output for machine readability.  In this
output,

> diff --git a/1<B1>.txt b/1<B1>.txt
> index 281ad6f..9444a66 100644
> --- a/1<B1>.txt
> +++ b/1<B1>.txt

the paths are not quoted because quotepath is set to false, but in
the next example, it

> ...
> [janusz@mikrus JavaCommon]$ git config --unset core.quotepath
> [janusz@mikrus JavaCommon]$ git config --add core.quotepath true
> [janusz@mikrus JavaCommon]$ git diff  --unified=3 -- "1ą.txt"
> warning: LF will be replaced by CRLF in 1<B1>.txt.
> The file will have its original line endings in your working directory.
> diff --git "a/1\261.txt" "b/1\261.txt"
> index 281ad6f..9444a66 100644
> --- "a/1\261.txt"
> +++ "b/1\261.txt"

is quoted due to the configuration setting.

Again, <B1> in the warning message is not affected, as the quotepath
configuration is not meant to affect messages that are meant for
human consumption.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]