git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/1] clean: further clean-up of implementation around "--force"
Date: Mon, 04 Mar 2024 21:46:44 +0300	[thread overview]
Message-ID: <87cys996nf.fsf@osv.gnss.ru> (raw)
In-Reply-To: <20240303220600.2491792-2-gitster@pobox.com> (Junio C. Hamano's message of "Sun, 3 Mar 2024 14:06:00 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> We clarified how clean.requireForce interacts with the --dry-run
> option in the previous commit, both in the implementation and in the
> documentation.  Even when "git clean" (without other options) is
> required to be used with "--force" (i.e. either clean.requireForce
> is unset, or explicitly set to true) to protect end-users from
> casual invocation of the command by mistake, "--dry-run" does not
> require "--force" to be used, because it is already its own
> protection mechanism by being a no-op to the working tree files.
>
> The previous commit, however, missed another clean-up opportunity
> around the same area.  Just like in the "--dry-run" mode, the
> command in the "--interactive" mode does not require "--force",
> either.  This is because by going interactive and giving the end
> user one more step to confirm, the mode itself is serving as its own
> protection mechanism.
>
> Let's take things one step further, unify the code that defines
> interaction between `--force` and these two other options.  Just
> like we added explanation for the reason why "--dry-run" does not
> honor `clean.requireForce`, add the same explanation for
> "--interactive".  Finally, add some tests to show the interaction
> between "--force" and "--interactive" (we already have tests that
> show interaction between "--force" and "--dry-run").

Looks fine to me, including the patch itself.

Thanks,
-- Sergey Organov


  parent reply	other threads:[~2024-03-04 18:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7le6ziqzb.fsf_-_@osv.gnss.ru>
2024-03-03 22:05 ` [PATCH v2] clean: improve -n and -f implementation and documentation Junio C Hamano
2024-03-03 22:06   ` [PATCH 1/1] clean: further clean-up of implementation around "--force" Junio C Hamano
2024-03-03 22:18     ` Junio C Hamano
2024-03-04 18:46     ` Sergey Organov [this message]
2024-03-04 18:39   ` [PATCH v2] clean: improve -n and -f implementation and documentation Sergey Organov
2024-03-04 18:41     ` Junio C Hamano
2024-03-04 18:48       ` Sergey Organov
2024-03-04 19:03     ` Junio C Hamano
2024-03-04 20:19       ` Sergey Organov

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87cys996nf.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).