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

Re: [PATCH] builtin/stash: configs keepIndex, includeUntracked

From
RCRicardo C <rpc01234@gmail.com>
Date
Feb 19, 2024, 21:41 UTC
Message-ID
<cdc377ea-d810-49c6-9124-c450aff34118@gmail.com>
In-Reply-To
<fc7a8c46-61e4-4b5d-b625-cbc845b81590@gmail.com>
Hello,
On 2/19/24 03:04, Jean-Noël Avila wrote:
> I'm not sure this would be better, but instead of mixing option compatibility 
> and actually building your logic, why not use a series of
> die_for_incompatible_opt3 and the like in order to clear the option lists, 
> then build your action logic without resorting to special values?

I'm not sure dying would be appropriate here, since the original behavior was already to clean up buffers and such and then return an errorful value (-1), and I'd rather keep maximum backwards compatibility. Also, the special value of -1 for `keep_index` and `include_untracked` is necessary to detect whether the variable was set by the CLI flags or if it is fine to override with the config value.

This could be addressed by moving more logic up to `push_stash` and `save_stash` (where the arguments are parsed), but this would need much more rewriting and would lead to some code duplication, for what I think is minimal gain.

Thank you,
Ricardo
Previous: Jean-Noël Avila
Message 16 of 16 in “builtin/stash: configs keepIndex, includeUntracked”
  1. builtin/stash: configs keepIndex, includeUntrackedMithicSpirit, Feb 18, 2024
  2. Phillip WoodFeb 18, 2024
  3. Ricardo CFeb 18, 2024
  4. Phillip WoodFeb 20, 2024
  5. Junio C HamanoFeb 20, 2024
  6. Ricardo CFeb 21, 2024
  7. Junio C HamanoFeb 21, 2024
  8. Ricardo CFeb 21, 2024
  9. Junio C HamanoFeb 21, 2024
  10. Junio C HamanoFeb 20, 2024
  11. Ricardo CFeb 20, 2024
  12. Junio C HamanoFeb 20, 2024
  13. Ricardo CFeb 20, 2024
  14. Kristoffer HaugsbakkFeb 20, 2024
  15. Jean-Noël AvilaFeb 19, 2024
  16. Ricardo CFeb 19, 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.