All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Grimm <koreth@midwinter.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] Add --ignore-notfound option to exit with zero status when no files are removed.
Date: Mon, 16 Apr 2007 01:12:30 -0700	[thread overview]
Message-ID: <46232FEE.9010907@midwinter.com> (raw)
In-Reply-To: <20070416075324.GA18961@midwinter.com>

Steven Grimm wrote:
> This allows "git rm -r --ignore-notfound" to be used as an index filter
> with cg-admin-rewritehist. The documentation for that command recommends
> using git-update-index --remove to filter files out of a tree's history,
> but that doesn't support recursive deletion like git-rm does, making it
> less convenient to filter directories from history.
>   

Having said that, in some sense the problem here is arguably with 
cg-admin-rewritehist bailing out when a filter command exits with a 
nonzero status; given that git-rm is likely to be a common filter people 
will want to use, ideally cg-admin-rewritehist should do the right thing 
with git-rm's normal exit codes. But it appears Cogito is not being 
actively maintained any more (correct me if I'm wrong; the latest stable 
release is half a year old at this point, while git has changed 
substantially since then) so it didn't seem too worthwhile to try to 
patch things from that side.

I think it makes sense to be able to optionally treat a lack of matches 
as a non-error condition like "rm -f" does, so I'm comfortable 
submitting this patch regardless.

On a related note, last time I asked a question that caused someone to 
point me to cg-admin-rewritehist, Linus said he'd like to see its 
functionality folded into git proper. I have to agree with that idea; 
there are some obvious enhancements that program could use, and it'll be 
easier to do that if it's part of an actively maintained code base.

-Steve

  parent reply	other threads:[~2007-04-16  8:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16  0:04 [PATCH] Add -q option to "git rm" to suppress output when there aren't errors Steven Grimm
2007-04-16  0:13 ` Junio C Hamano
2007-04-16  0:17   ` Steven Grimm
2007-04-16  1:14     ` Junio C Hamano
2007-04-16  7:46       ` [PATCH 1/2] Add --quiet option to suppress output of "rm" commands for removed files Steven Grimm
2007-04-16  7:53         ` [PATCH 2/2] Add --ignore-notfound option to exit with zero status when no files are removed Steven Grimm
2007-04-16  7:59           ` Junio C Hamano
2007-04-16  8:13             ` Steven Grimm
2007-04-16  8:50             ` Jeff King
2007-04-16  8:53               ` Junio C Hamano
2007-04-16  9:04                 ` Jeff King
2007-04-16 18:29                   ` Josef Weidendorfer
2007-04-16  8:12           ` Steven Grimm [this message]
2007-04-16  7:54       ` [PATCH] Add -q option to "git rm" to suppress output when there aren't errors Alex Riesen

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=46232FEE.9010907@midwinter.com \
    --to=koreth@midwinter.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /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.