All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] builtin-rm: Add a --force flag
@ 2008-08-08 22:37 Pieter de Bie
  2008-08-08 23:05 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Pieter de Bie @ 2008-08-08 22:37 UTC (permalink / raw)
  To: Git Mailinglist, Junio C Hamano; +Cc: Pieter de Bie

This adds a --force flag to git-rm, making it somewhat easier for
subversion people to switch.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
---

  I heard some people complain about how they try "svn rm -f" or "git rm
  --force", which both fail. We can help them a bit by supporting --force too.

 builtin-rm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-rm.c b/builtin-rm.c
index ee8247b..4c9f483 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -131,7 +131,7 @@ static struct option builtin_rm_options[] = {
 	OPT__DRY_RUN(&show_only),
 	OPT__QUIET(&quiet),
 	OPT_BOOLEAN( 0 , "cached",         &index_only, "only remove from the index"),
-	OPT_BOOLEAN('f', NULL,             &force,      "override the up-to-date check"),
+	OPT_BOOLEAN('f', "force",             &force,      "override the up-to-date check"),
 	OPT_BOOLEAN('r', NULL,             &recursive,  "allow recursive removal"),
 	OPT_BOOLEAN( 0 , "ignore-unmatch", &ignore_unmatch,
 				"exit with a zero status even if nothing matched"),
-- 
1.6.0.rc1.288.g5b89f

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] builtin-rm: Add a --force flag
  2008-08-08 22:37 [PATCH] builtin-rm: Add a --force flag Pieter de Bie
@ 2008-08-08 23:05 ` Junio C Hamano
  2008-08-08 23:41   ` [PATCH] bash completion: git rm has grown a --force option Todd Zullinger
  2008-08-09  0:05   ` [PATCH] builtin-rm: Add a --force flag Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Junio C Hamano @ 2008-08-08 23:05 UTC (permalink / raw)
  To: Pieter de Bie; +Cc: Git Mailinglist

I think this makes sense even this late in -rc cycle.  Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] bash completion: git rm has grown a --force option
  2008-08-08 23:05 ` Junio C Hamano
@ 2008-08-08 23:41   ` Todd Zullinger
  2008-08-09  1:07     ` SZEDER Gábor
  2008-08-09  0:05   ` [PATCH] builtin-rm: Add a --force flag Jeff King
  1 sibling, 1 reply; 6+ messages in thread
From: Todd Zullinger @ 2008-08-08 23:41 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Pieter de Bie, Lee Marlow, Shawn O. Pearce, Git Mailinglist

Signed-off-by: Todd Zullinger <tmz@pobox.com>
---

Junio C Hamano wrote:
> I think this makes sense even this late in -rc cycle.  Thanks.

Perhaps this is worth adding as well then, since Lee went to the
trouble of adding completion for git rm just the other day? ;)

 contrib/completion/git-completion.bash |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 3396e35..2d0e468 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1361,7 +1361,7 @@ _git_rm ()
 	local cur="${COMP_WORDS[COMP_CWORD]}"
 	case "$cur" in
 	--*)
-		__gitcomp "--cached --dry-run --ignore-unmatch --quiet"
+		__gitcomp "--cached --dry-run --force --ignore-unmatch --quiet"
 		return
 		;;
 	esac
-- 
1.6.0.rc2

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In some cultures what I do would be considered normal.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] builtin-rm: Add a --force flag
  2008-08-08 23:05 ` Junio C Hamano
  2008-08-08 23:41   ` [PATCH] bash completion: git rm has grown a --force option Todd Zullinger
@ 2008-08-09  0:05   ` Jeff King
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff King @ 2008-08-09  0:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Pieter de Bie, Git Mailinglist

On Fri, Aug 08, 2008 at 04:05:16PM -0700, Junio C Hamano wrote:

> I think this makes sense even this late in -rc cycle.  Thanks.

Maybe squash this in?

-Peff

diff --git a/Documentation/git-rm.txt b/Documentation/git-rm.txt
index 4d0c495..0aaf161 100644
--- a/Documentation/git-rm.txt
+++ b/Documentation/git-rm.txt
@@ -36,6 +36,7 @@ OPTIONS
 	but this requires the `-r` option to be explicitly given.
 
 -f::
+--force::
 	Override the up-to-date check.
 
 -n::

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash completion: git rm has grown a --force option
  2008-08-08 23:41   ` [PATCH] bash completion: git rm has grown a --force option Todd Zullinger
@ 2008-08-09  1:07     ` SZEDER Gábor
  2008-08-09  1:21       ` Todd Zullinger
  0 siblings, 1 reply; 6+ messages in thread
From: SZEDER Gábor @ 2008-08-09  1:07 UTC (permalink / raw)
  To: Todd Zullinger
  Cc: Junio C Hamano, Pieter de Bie, Lee Marlow, Shawn O. Pearce,
	Git Mailinglist

Hi,

On Fri, Aug 08, 2008 at 07:41:34PM -0400, Todd Zullinger wrote:
> Perhaps this is worth adding as well then, since Lee went to the
> trouble of adding completion for git rm just the other day? ;)
I disagree here.  '--force' is an option that should be used with
care, therefore facilitating its usage by completion support is not a
good idea IMHO.  This is also the status quo:  while there are many
git commands with a '--force' option, we do not complete any of them.

Regards,
Gábor

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] bash completion: git rm has grown a --force option
  2008-08-09  1:07     ` SZEDER Gábor
@ 2008-08-09  1:21       ` Todd Zullinger
  0 siblings, 0 replies; 6+ messages in thread
From: Todd Zullinger @ 2008-08-09  1:21 UTC (permalink / raw)
  To: SZEDER Gábor
  Cc: Junio C Hamano, Pieter de Bie, Lee Marlow, Shawn O. Pearce,
	Git Mailinglist

[-- Attachment #1: Type: text/plain, Size: 628 bytes --]

SZEDER Gábor wrote:
> I disagree here.  '--force' is an option that should be used with
> care, therefore facilitating its usage by completion support is not
> a good idea IMHO.  This is also the status quo:  while there are
> many git commands with a '--force' option, we do not complete any of
> them.

Yes, my apologies for missing that point.  It is a good one.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A word to the wise ain't necessary -- it's the stupid ones who need
the advice.
    -- Bill Cosby


[-- Attachment #2: Type: application/pgp-signature, Size: 542 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-08-09  1:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 22:37 [PATCH] builtin-rm: Add a --force flag Pieter de Bie
2008-08-08 23:05 ` Junio C Hamano
2008-08-08 23:41   ` [PATCH] bash completion: git rm has grown a --force option Todd Zullinger
2008-08-09  1:07     ` SZEDER Gábor
2008-08-09  1:21       ` Todd Zullinger
2008-08-09  0:05   ` [PATCH] builtin-rm: Add a --force flag Jeff King

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.