git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ricardo C <rpc01234@gmail.com>
To: "Jean-Noël Avila" <avila.jn@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] builtin/stash: configs keepIndex, includeUntracked
Date: Mon, 19 Feb 2024 16:41:25 -0500	[thread overview]
Message-ID: <cdc377ea-d810-49c6-9124-c450aff34118@gmail.com> (raw)
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

      reply	other threads:[~2024-02-19 21:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18  3:30 [PATCH] builtin/stash: configs keepIndex, includeUntracked MithicSpirit
2024-02-18 10:32 ` Phillip Wood
2024-02-18 17:54   ` Ricardo C
2024-02-20 11:01     ` Phillip Wood
2024-02-20 17:47       ` Junio C Hamano
2024-02-21 19:13         ` Ricardo C
2024-02-21 20:09           ` Junio C Hamano
2024-02-21 23:14             ` Ricardo C
2024-02-21 23:53             ` Junio C Hamano
2024-02-20  2:52   ` Junio C Hamano
2024-02-20  3:30     ` Ricardo C
2024-02-20  3:44       ` Junio C Hamano
2024-02-20  3:59         ` Ricardo C
2024-02-20 19:30           ` Kristoffer Haugsbakk
2024-02-19  8:04 ` Jean-Noël Avila
2024-02-19 21:41   ` Ricardo C [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdc377ea-d810-49c6-9124-c450aff34118@gmail.com \
    --to=rpc01234@gmail.com \
    --cc=avila.jn@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).