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

Re: [PATCH RFC] git-send-email --expand-aliases

From
ACAlex Chiang <achiang@hp.com>
Date
Nov 24, 2009, 00:45 UTC
Message-ID
<20091124004554.GA27643@ldl.fc.hp.com>
In-Reply-To
<7v6390sqhz.fsf@alter.siamese.dyndns.org>
* Junio C Hamano <gitster@pobox.com>:
Show 22 quoted lines
> Alex Chiang <achiang@hp.com> writes:
> 
> > I'm an StGit user, and while StGit has its own 'stg mail'
> > feature, it doesn't know how to expand email aliases (yet).
> >
> > Certainly, one way to solve that problem would be to hack stgit
> > so that it can parse alias files, but to me, that seems silly
> > when git-send-email can already do that.
> >
> > This patch teaches git-send-email to only expand email addresses
> > so that other git porcelains don't have to roll their own mail
> > alias parsers.
> 
> Certainly, one way to solve that would be to hack _both_ stgit and
> send-email so that the former runs the latter _only_ to ask for the
> expansion and then send the message out, but to me, that seems silly
> when git-send-email can already do both expanding aliases and sending
> the message ;-)
> 
> If you are changing StGit to call git-send-email anyway, why not arrange
> stgit to call git-send-email to send the message out instead, instead of
> sending messages on its own?

Yeah, I thought about that as I was poking around further in StGit to figure out how it would be calling git-send-email. ;)

Show 15 quoted lines
> > I imagine the internal implementation of stg mail to work
> > something like:
> >
> > 	call git-send-email --expand-aliases repeatedly, once for
> > 	all the combined --to= args, then for all the combined --cc= args,
> > 	and finally for all the combined --bcc= args (all passed
> > 	to stg mail), read from stdout until EOF
> 
> I imagine the internal implementation of stg mail would work something
> like:
> 
>     prepare messages to send out
>     call git-send-email and have it send them
> 
> What am I missing?
My lack of familiarity with StGit internals. ;)

Your suggestion is much better. I'll take a closer look at StGit and see how feasible it is.

Unless Catalin has strong objections?

Thanks, /ac

Previous: Junio C HamanoNext: Karl Wiberg
Message 3 of 9 in “git-send-email --expand-aliases”
  1. git-send-email --expand-aliasesAlex Chiang, Nov 23, 2009
  2. Junio C HamanoNov 24, 2009
  3. Alex ChiangNov 24, 2009
  4. Karl WibergNov 24, 2009
  5. Junio C HamanoNov 24, 2009
  6. Karl WibergNov 24, 2009
  7. Catalin MarinasNov 24, 2009
  8. Alex ChiangNov 24, 2009
  9. Karl WibergNov 24, 2009

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.