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

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

From
Jeff King <peff@peff.net>
Date
Apr 8, 2011, 21:32 UTC
Message-ID
<20110408213201.GA20348@sigill.intra.peff.net>
In-Reply-To
<7v4o6830cc.fsf@alter.siamese.dyndns.org>
On Fri, Apr 08, 2011 at 02:22:11PM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > 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 <peff@peff.net>
> >
> > 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 27 of 33 in “[PATCHv2 0/2] a couple of git-svn patches”
  1. Alejandro R. SedeñoApr 4, 2011
  2. 1/2 git-svn: Fix the commit-url config to be the base url, just like the url configAlejandro R. Sedeño, Apr 4, 2011
  3. Eric WongApr 4, 2011
  4. James Y KnightApr 4, 2011
  5. Eric WongApr 4, 2011
  6. Alejandro R. SedeñoApr 5, 2011
  7. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 5, 2011
  8. Alejandro R. SedeñoApr 5, 2011
  9. Eric WongApr 5, 2011
  10. Michael J GruberApr 6, 2011
  11. Alejandro R. SedeñoApr 6, 2011
  12. Michael J GruberApr 6, 2011
  13. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 6, 2011
  14. Michael J GruberApr 6, 2011
  15. Alejandro R. SedeñoApr 6, 2011
  16. Michael J GruberApr 6, 2011
  17. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 8, 2011
  18. Junio C HamanoApr 8, 2011
  19. Michael J GruberApr 8, 2011
  20. Jeff KingApr 8, 2011
  21. Eric WongApr 9, 2011
  22. Michael J GruberApr 6, 2011
  23. Alejandro R. SedeñoApr 6, 2011
  24. 2/2 git-svn: Cache results of running the executable "git config"Alejandro R. Sedeño, Apr 4, 2011
  25. Eric WongApr 4, 2011
  26. Junio C HamanoApr 5, 2011
  27. Jeff KingApr 8, 2011
  28. Junio C HamanoApr 8, 2011
  29. Jeff KingApr 8, 2011
  30. Jeff KingApr 8, 2011
  31. Alejandro R. SedeñoApr 22, 2011
  32. Jeff KingApr 22, 2011
  33. Alejandro R. SedeñoApr 22, 2011

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.