All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Nadav Goldstein <nadav.goldstein96@gmail.com>
Cc: Nadav Goldstein via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>
Subject: Re: [PATCH v3] Introduced force flag to the git stash clear subcommand.
Date: Tue, 20 Jun 2023 13:46:54 -0700	[thread overview]
Message-ID: <xmqqpm5plv41.fsf@gitster.g> (raw)
In-Reply-To: <1540e884-08c7-922e-1fd9-65616268c1c9@gmail.com> (Nadav Goldstein's message of "Tue, 20 Jun 2023 22:54:53 +0300")

Nadav Goldstein <nadav.goldstein96@gmail.com> writes:

> I see, but isn't the same argument apply for git clean? if not adding
> the force flag, the same message as I wrote appear in git clean (I
> copied it from there), and it will exit without any other information,
> hence given your argument, running git clean is also not very useful.

The thing is that "git clean" by default forces people to choose
between "-f" and "-n" to force people to understand the issue.  And
once they understand the issue, they'd learn to run "clean -n"
first, which lets them see what would be removed, before they run
"clean -f".  Does your "stash clear" work the same way?  I do not
think so.

If there is "stash clear --dry-run" that runs "stash list", it might
be similar, but not similar enough.  I wonder if "stash clear", when
stashClear.requireForce is set to true and unless "--force" is
given, should do "stash list" and then error out.  I dunno.


  reply	other threads:[~2023-06-20 20:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 21:18 [PATCH] stash: added safety flag for stash clear subcommand Nadav Goldstein via GitGitGadget
2022-05-16  3:17 ` Junio C Hamano
2022-05-23  6:12 ` [PATCH v2 0/2] stash clear: " Nadav Goldstein via GitGitGadget
2022-05-23  6:12   ` [PATCH v2 1/2] add-menu: added add-menu to lib objects Nadav Goldstein via GitGitGadget
2022-05-23 20:03     ` Derrick Stolee
2022-05-23 20:35       ` Junio C Hamano
2022-05-23  6:12   ` [PATCH v2 2/2] clean: refector to the interactive part of clean Nadav Goldstein via GitGitGadget
2022-05-23 19:45     ` Derrick Stolee
2022-05-23 19:33   ` [PATCH v2 0/2] stash clear: added safety flag for stash clear subcommand Derrick Stolee
2023-06-20  0:03   ` [PATCH v3] Introduced force flag to the git " Nadav Goldstein via GitGitGadget
2023-06-20  6:25     ` Junio C Hamano
2023-06-20 19:54       ` Nadav Goldstein
2023-06-20 20:46         ` Junio C Hamano [this message]
2023-06-20 21:01         ` Eric Sunshine
2023-06-20 21:42           ` Nadav Goldstein

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=xmqqpm5plv41.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=nadav.goldstein96@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.