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

Re: [PATCH 2/3] git send-email: do not ask questions when --compose is used.

From
Pierre Habouzit <madcoder@debian.org>
Date
Nov 1, 2008, 17:08 UTC
Message-ID
<20081101170817.GC26229@artemis.corp>
In-Reply-To
<20081101130033.GD17961@sys-0.hiltweb.site>
On Sat, Nov 01, 2008 at 01:00:33PM +0000, Ian Hilt wrote:
Show 16 quoted lines
> On Sat, Nov 01, 2008 at 12:04:39PM +0100, Pierre Habouzit wrote:
> > I didn't do it for a very good reason: the To field is tricker to parse
> > because very fast it's multiline, and must be split along the ',' when
> > parsed back and so on.
> 
> Right.  So my patch is broken in that it doesn't parse the addresses
> correctly.  This _should_ be easy to fix.  I knew my patch sucked, but I
> wanted to get the idea out there.  For me, I don't like specifying all
> that information on the command-line.  It would be nice to be able to
> edit the To and Cc fields in the editor.
> 
> > And even moreuseful than the To is the Cc list that git-send-email
> > bloats to death and that I would like to reduce very often.
> 
> You mean git-send-email adds too many addresses to the Cc list, or the
> code for those fields is already bloated to death?
The former, I've not looked at the code I can't really say.
Show 5 quoted lines
> > But sadly that needs an expertise of perl I absolutely don't have. We
> > probably even want to depend on some MIME perl library that knows about
> > those kind of issues and do it for us well.
> 
> I'm confused here.  Why would a MIME library help?

Hmm maybe I'm wrong, but the idea would be to do what mutt does and be able to parse:

To: John Doe <some.address@some.tld>, Random Joe <random.joe@abc.def>,
  Superman <batman@nyc.us>,
  "Someone with a comma, inside its tag name" <a@b.com>

And that needs to know how to do that with perl, and _really_ I hate perl enough for not being able to do that well. Splitting on ',' is just not going to fly.

> > But yeah, I knew I left out those, and this was the reason.
> 
> Anyway, do you, or does anyone else, think it's even worth coding the
> possibility for the user to edit the To and Cc fields?
*YES*

I would love to see git-send-email work like mutt does: it fills the field like it does now, and you are allowed to fix that, and it parses the buffer back to guess what you wanted. It allow to drop most of the interactive prompting that is so annoying (since it's not in-shell and has no history and stuff like that, unlike my $EDITOR).

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Ian HiltNext: Francis Galiegue
Message 27 of 62 in “git send-email improvements”
  1. Pierre HabouzitOct 31, 2008
  2. 1/3 git send-email: avoid leaking directory file descriptors.Pierre Habouzit, Oct 31, 2008
  3. 2/3 git send-email: interpret unknown files as revision listsPierre Habouzit, Oct 31, 2008
  4. 3/3 git send-email: add --annotate optionPierre Habouzit, Oct 31, 2008
  5. Ian HiltOct 31, 2008
  6. Junio C HamanoNov 2, 2008
  7. Pierre HabouzitNov 2, 2008
  8. Matthieu MoyNov 3, 2008
  9. git send-email: allow any rev-list option as an argument.Pierre Habouzit, Oct 31, 2008
  10. Jeff KingNov 2, 2008
  11. Pierre HabouzitNov 2, 2008
  12. Jeff KingNov 2, 2008
  13. Pierre HabouzitNov 3, 2008
  14. Junio C HamanoNov 4, 2008
  15. Pierre HabouzitNov 4, 2008
  16. Jeff KingNov 2, 2008
  17. Further enhancement proposal for git-send-emailPierre Habouzit, Oct 31, 2008
  18. 1/3 git send-email: make the message file name more specific.Pierre Habouzit, Oct 31, 2008
  19. 2/3 git send-email: do not ask questions when --compose is used.Pierre Habouzit, Oct 31, 2008
  20. 3/3 git send-email: turn --compose on when more than one patch.Pierre Habouzit, Oct 31, 2008
  21. Ian HiltOct 31, 2008
  22. Pierre HabouzitOct 31, 2008
  23. Ian HiltOct 31, 2008
  24. Ian HiltNov 1, 2008
  25. Pierre HabouzitNov 1, 2008
  26. Ian HiltNov 1, 2008
  27. Pierre HabouzitNov 1, 2008
  28. Francis GaliegueNov 1, 2008
  29. Pierre HabouzitNov 1, 2008
  30. Francis GaliegueNov 1, 2008
  31. Ian HiltNov 1, 2008
  32. Junio C HamanoNov 2, 2008
  33. Pierre HabouzitNov 2, 2008
  34. Ian HiltNov 2, 2008
  35. Pierre HabouzitNov 3, 2008
  36. [take 2] git send-email updatesPierre Habouzit, Nov 4, 2008
  37. 1/5 git send-email: make the message file name more specific.Pierre Habouzit, Nov 4, 2008
  38. 2/5 git send-email: interpret unknown files as revision listsPierre Habouzit, Nov 4, 2008
  39. 3/5 git send-email: add --annotate optionPierre Habouzit, Nov 4, 2008
  40. 4/5 git send-email: ask less questions when --compose is used.Pierre Habouzit, Nov 4, 2008
  41. 5/5 git send-email: turn --compose on when more than one patch.Pierre Habouzit, Nov 4, 2008
  42. Junio C HamanoNov 4, 2008
  43. Jeff KingNov 5, 2008
  44. Junio C HamanoNov 5, 2008
  45. Pierre HabouzitNov 5, 2008
  46. Junio C HamanoNov 5, 2008
  47. Junio C HamanoNov 9, 2008
  48. Francis GaliegueNov 4, 2008
  49. Junio C HamanoNov 4, 2008
  50. Junio C HamanoNov 4, 2008
  51. [take 2] git send-email updatesPierre Habouzit, Nov 10, 2008
  52. 1/4 git send-email: make the message file name more specific.Pierre Habouzit, Nov 10, 2008
  53. 2/4 git send-email: interpret unknown files as revision listsPierre Habouzit, Nov 10, 2008
  54. 3/4 git send-email: add --annotate optionPierre Habouzit, Nov 10, 2008
  55. 4/4 git send-email: ask less questions when --compose is used.Pierre Habouzit, Nov 10, 2008
  56. Junio C HamanoNov 12, 2008
  57. Junio C HamanoNov 11, 2008
  58. Pierre HabouzitNov 11, 2008
  59. Junio C HamanoNov 12, 2008
  60. Re* [take 2] git send-email updatesJunio C Hamano, Nov 13, 2008
  61. Pierre HabouzitNov 15, 2008
  62. Pierre HabouzitNov 15, 2008

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.