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

Re: [PATCH] test-lib: allow short options to be stacked

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2020, 20:11 UTC
Message-ID
<xmqqpnd58o3z.fsf@gitster.c.googlers.com>
In-Reply-To
<CAHd-oW73xp2=XcFr1F57fo2UtAyuZ2aeXVSc_A50bYKKVN7fJw@mail.gmail.com>
Matheus Tavares Bernardino <matheus.bernardino@usp.br> writes:
> Makes sense, thanks. However, using Peff's suggestion[1] for the
> character iteration already eliminates the need for extra processes.

Even without an extra process, having to strip "-", assign an empty string to $extra, and then strip that empty string from the tail to come up with a single letter in $this, all are consuming cycles. Even though these wasted cycles are now much smaller, having an arm that specifically catches unbundled case and avoid doing anything extra makes the codeflow clear, I would think.

Previous: Matheus Tavares BernardinoNext: Matheus Tavares
Message 11 of 16 in “test-lib: allow short options to be stacked”
  1. test-lib: allow short options to be stackedMatheus Tavares, Mar 21, 2020
  2. Junio C HamanoMar 21, 2020
  3. Matheus TavaresMar 21, 2020
  4. Jeff KingMar 21, 2020
  5. Matheus Tavares BernardinoMar 21, 2020
  6. Jeff KingMar 22, 2020
  7. SZEDER GáborMar 22, 2020
  8. Junio C HamanoMar 21, 2020
  9. Johannes SixtMar 21, 2020
  10. Matheus Tavares BernardinoMar 21, 2020
  11. Junio C HamanoMar 21, 2020
  12. test-lib: allow short options to be bundledMatheus Tavares, Mar 21, 2020
  13. Junio C HamanoMar 21, 2020
  14. Matheus Tavares BernardinoMar 21, 2020
  15. test-lib: allow short options to be bundledMatheus Tavares, Mar 22, 2020
  16. Junio C HamanoMar 23, 2020

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.