git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jbialobr <jbialobr@o2.pl>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: msysgit@googlegroups.com, git@vger.kernel.org
Subject: Re: Re: File path not escaped in warning message
Date: Mon, 06 Aug 2012 08:53:17 +0200	[thread overview]
Message-ID: <2783325c.512962ce.501f69dd.5711e@o2.pl> (raw)
In-Reply-To: <7v1ujl3ysi.fsf@alter.siamese.dyndns.org>

There is nothing said in the manual, that core.quotepath affects only header. But it is not the point. You don't know which part of git output will be consumed by machine. Warning message is addressed to human, but it can be consumed by program in the same way as all other messages and output data.
Imho, since warning comes from git, path should be quoted to
make git behaviour consistent. 
From git-log help:
> Note that we deliberately chose not to re-code the commit log message when a commit is made to force UTF-8 at the commit object level, because re-coding to UTF-8 is not necessarily a reversible operation.

If re-coding from one encoding to other is not necessarily a reversible operation, and you can set logoutputencoding to any encoding you wish, you may loose some charatcers while recoding file path in warning message. Quoting it would be desired then.

Janusz Białobrzewski.

---- Wiadomość Oryginalna ----
Od: Junio C Hamano <gitster@pobox.com>
Do: Janusz Białobrzewski <jbialobr@o2.pl>
Kopia do: msysgit@googlegroups.com,  git@vger.kernel.org
Data: 5 sierpnia 2012 21:48
Temat: Re: File path not escaped in warning message

> Janusz Białobrzewski <jbialobr@o2.pl> 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.

-- 
*** 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

  reply	other threads:[~2012-08-06  6:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 12:55 File path not escaped in warning message Janusz Białobrzewski
2012-08-04 22:20 ` Junio C Hamano
2012-08-05 12:05   ` Janusz Białobrzewski
2012-08-05 19:48     ` Junio C Hamano
2012-08-06  6:53       ` jbialobr [this message]
2012-08-06 17:18         ` Re: " karsten.blees
2012-08-07  8:20           ` jbialobr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2783325c.512962ce.501f69dd.5711e@o2.pl \
    --to=jbialobr@o2.pl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).