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

Re: [PATCH 3/3] send-email: teach git send-email option to translate aliases

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2024, 21:57 UTC
Message-ID
<xmqqttfufzkj.fsf@gitster.g>
In-Reply-To
<20240808-jk-translate-alias-send-email-v1-3-10a03b3d6b06@gmail.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
> From: Jacob Keller <jacob.keller@gmail.com>
>
> Add a new "--translate-aliases" option to git send-email which allows
If you add a thing, it by definition is new, isn't it?
> Instead, skip calling GetOptions a second time of --translate-aliases is
"of"???  "if" perhaps?
> set. This has the effect that known options will instead be translated
> as aliases instead of producing a warning, but this seems like the best
> trade off of the available options.

Hmph, I do not quite get why you need such a hack (to be honest, I do not quite understand why dump-aliases needs a similar hack, either, even though I do understand why identity thing needs a special caseing).

After GetOptions() returns, usuall we process everything remaining on the command line as files that contain messages, right? But before that happens (i.e. anywhere before the while () loop that processes elements in @ARGV), you can check if your new option was given, and if so you can map contents of @ARGV using %aliases and exit, and you are done, no? Bonus point if you make sure that no other options were given, but perhaps there are some strange folks who want to use "--to=fu" as an e-mail alias, so instead of complaining that "--translate" does not mix with any other options when "git send-email --translate --to=fu" was run, giving alias translation for "--to=fu" may be a better behaviour for those users anyway ;-).

Previous: Jacob KellerNext: Jacob Keller
Message 5 of 10 in “send-email: teach git send-email mode to translate aliases”
  1. 0/3 send-email: teach git send-email mode to translate aliasesJacob Keller, Aug 8, 2024
  2. 1/3 t90001-send-email.sh: fix quoting for mailrc --dump-aliases testJacob Keller, Aug 8, 2024
  3. 2/3 t9001-send-email.sh: update alias list used for pine testJacob Keller, Aug 8, 2024
  4. 3/3 send-email: teach git send-email option to translate aliasesJacob Keller, Aug 8, 2024
  5. Junio C HamanoAug 8, 2024
  6. Jacob KellerAug 9, 2024
  7. Junio C HamanoAug 9, 2024
  8. Jacob KellerAug 9, 2024
  9. Junio C HamanoAug 9, 2024
  10. Jacob KellerAug 10, 2024

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.