Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-svn: Add a svn-remote.<name>.pushurl config key

From: Jeff King <hidden>
Date: 2016-06-15 22:51:00

On Fri, Apr 08, 2011 at 02:22:11PM -0700, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
I think format-patch is totally lacking in this type of quoting. If I
do:

  $ git init
  $ git config user.name '<bogus> with "quotes"'
  $ echo contents >foo && git add . && git commit -m foo
  $ git format-patch --stdout --root
  ...
  From: bogus with "quotes [off-list ref]

So some of my magic characters are just stripped, and some of them get
included, making the output bogus (the stripping of <> actually happens
within git, so the commit itself is missing them).
The output from format-patch is meant to be slurped into MUA, so I would
say that they should show what a human user would type the name to
Thunderbird or message.el or whatever, and it is MUA's respoinsibility to
make it RFC comformant.  And that is why I mentioned that send-email
may want to learn a new trick or two.
I disagree. Format-patch claims to make an mbox, so it should make one
that is valid (actually, the documentation is very wishy-washy about
whether it is an mbox; we say "formatted to resemble UNIX mailbox
format" at one point, and "print all commits...in mbox format" later).

But that is a philosophical distinction. What matters in practice is
what MUAs expect to get, and how they deal with it. I expect most MUAs
handle bare "." just fine, because it's fairly unambiguous. But try:

  git init repo && cd repo
  git config user.name 'Jeff "Peff" King' &&
  echo content >>file &&
  git add file &&
  git commit -m one

  git format-patch -1 --stdout >mbox

now open the result in your MUA. Mutt strips the quotes and I become
"Jeff Peff King".

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help