git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: File path not escaped in warning message

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2012, 19:48 UTC
Message-ID
<7v1ujl3ysi.fsf@alter.siamese.dyndns.org>
In-Reply-To
<501E616E.6000907@o2.pl>
Janusz Białobrzewski <jbialobr@o2.pl> writes:
Show 6 quoted lines
> 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

Show 10 quoted lines
> ...
> [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.

-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en
Previous: Janusz BiałobrzewskiNext: jbialobr
Message 4 of 7 in “File path not escaped in warning message”
  1. Janusz BiałobrzewskiAug 4, 2012
  2. Junio C HamanoAug 4, 2012
  3. Janusz BiałobrzewskiAug 5, 2012
  4. Junio C HamanoAug 5, 2012
  5. jbialobrAug 6, 2012
  6. karsten.blees@dcon.deAug 6, 2012
  7. jbialobrAug 7, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.