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

Re: [PATCH 1/4] i18n: factorize more 'incompatible options' messages

From
Johannes Sixt <j6t@kdbg.org>
Date
Jan 25, 2022, 21:26 UTC
Message-ID
<5740b0c5-7df8-5947-a4c9-0ece2bf17891@kdbg.org>
In-Reply-To
<2894278.sRLLl5rxgE@cayenne>
Am 25.01.22 um 21:52 schrieb Jean-Noël AVILA:
Show 20 quoted lines
> Le lundi 24 janvier 2022, 12:06:19 CET Phillip Wood a écrit :
>> On 24/01/2022 07:14, Johannes Sixt wrote:
>>> A general comment: To me, it looks like you didn't want to change the
>>> variable name 'f' in the first hunk above, and then just named the array
>>> 'f_options' to go with 'f'. Perhaps `exclusive_opt` (not plural!) for
>>> the array. Now, renaming 'f' to something longer makes the code a bit
>>> unwieldy. Therefore, let me suggest yet another approach: factor out
>>> functions check_exclusive_opts3(), check_exclusive_opts4(), to be used 
> like
>>>
>>> 	check_exclusive_opts3(use_stdout, "--stdout",
>>> 		rev.diffopt.close_file, "--output",
>>> 		output_directory, "--output-directory");
>>>
>>> I am not yet proposing check_exclusive_opts2(), but others may think it
>>> is an improvement, too, (if they think that such functions are an
>>> improvement in the first place).
> 
> Will factorize away such exclusive options, but I'm not sure where. Should it 
> be in git-compat-util.h?

How about parse-options.*? There are already some helper functions near the end of parse-options.c. Perhaps the names I suggested must be revised, though.

-- Hannes
Previous: Jean-Noël AVILANext: Jean-Noël Avila via GitGitGadget
Message 6 of 41 in “Factorize i18n”
  1. 0/4 Factorize i18nJean-Noël Avila via GitGitGadget, Jan 22, 2022
  2. 1/4 i18n: factorize more 'incompatible options' messagesJean-Noël Avila via GitGitGadget, Jan 22, 2022
  3. Johannes SixtJan 24, 2022
  4. Phillip WoodJan 24, 2022
  5. Jean-Noël AVILAJan 25, 2022
  6. Johannes SixtJan 25, 2022
  7. 2/4 i18n: factorize "invalid value" messagesJean-Noël Avila via GitGitGadget, Jan 22, 2022
  8. Phillip WoodJan 24, 2022
  9. 4/4 i18n: transfer variables into placeholders in command synopsisJean-Noël Avila via GitGitGadget, Jan 22, 2022
  10. 3/4 i18n: remove from i18n strings that do not hold translatable partsJean-Noël Avila via GitGitGadget, Jan 22, 2022
  11. 0/4 Factorize i18nJean-Noël Avila via GitGitGadget, Jan 28, 2022
  12. 1/4 i18n: factorize more 'incompatible options' messagesJean-Noël Avila via GitGitGadget, Jan 28, 2022
  13. Johannes SixtJan 28, 2022
  14. Junio C HamanoJan 28, 2022
  15. Johannes SixtJan 29, 2022
  16. Jean-Noël AVILAJan 29, 2022
  17. Johannes SixtJan 29, 2022
  18. Ævar Arnfjörð BjarmasonFeb 1, 2022
  19. 2/4 i18n: factorize "invalid value" messagesJean-Noël Avila via GitGitGadget, Jan 28, 2022
  20. 3/4 i18n: remove from i18n strings that do not hold translatable partsJean-Noël Avila via GitGitGadget, Jan 28, 2022
  21. 4/4 i18n: transfer variables into placeholders in command synopsisJean-Noël Avila via GitGitGadget, Jan 28, 2022
  22. 0/4 Factorize i18nJean-Noël Avila via GitGitGadget, Jan 30, 2022
  23. 1/4 i18n: factorize more 'incompatible options' messagesJean-Noël Avila via GitGitGadget, Jan 30, 2022
  24. Johannes SixtJan 31, 2022
  25. Phillip WoodJan 31, 2022
  26. 2/4 i18n: factorize "invalid value" messagesJean-Noël Avila via GitGitGadget, Jan 30, 2022
  27. 4/4 i18n: transfer variables into placeholders in command synopsisJean-Noël Avila via GitGitGadget, Jan 30, 2022
  28. Phillip WoodJan 31, 2022
  29. Jean-Noël AvilaJan 31, 2022
  30. 3/4 i18n: remove from i18n strings that do not hold translatable partsJean-Noël Avila via GitGitGadget, Jan 30, 2022
  31. Johannes SixtJan 31, 2022
  32. 0/4 Factorize i18nJean-Noël Avila via GitGitGadget, Jan 31, 2022
  33. 1/4 i18n: factorize more 'incompatible options' messagesJean-Noël Avila via GitGitGadget, Jan 31, 2022
  34. Junio C HamanoJan 31, 2022
  35. Johannes SixtFeb 1, 2022
  36. Junio C HamanoFeb 1, 2022
  37. Jean-Noël AvilaFeb 2, 2022
  38. Johannes SixtFeb 2, 2022
  39. 2/4 i18n: factorize "invalid value" messagesJean-Noël Avila via GitGitGadget, Jan 31, 2022
  40. 3/4 i18n: remove from i18n strings that do not hold translatable partsJean-Noël Avila via GitGitGadget, Jan 31, 2022
  41. 4/4 i18n: fix some misformated placeholders in command synopsisJean-Noël Avila via GitGitGadget, Jan 31, 2022

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.