From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 9C78D2036B for ; Sat, 7 Oct 2017 21:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752685AbdJGVlA (ORCPT ); Sat, 7 Oct 2017 17:41:00 -0400 Received: from cpanel2.indieserve.net ([199.212.143.6]:36720 "EHLO cpanel2.indieserve.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823AbdJGVk7 (ORCPT ); Sat, 7 Oct 2017 17:40:59 -0400 Received: from cpec03f0ed08c7f-cm68b6fcf980b0.cpe.net.cable.rogers.com ([174.118.92.171]:34254 helo=localhost.localdomain) by cpanel2.indieserve.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1e0wqA-0007WF-D0; Sat, 07 Oct 2017 17:40:58 -0400 Date: Sat, 7 Oct 2017 17:40:56 -0400 (EDT) From: "Robert P. J. Day" X-X-Sender: rpjday@localhost.localdomain To: Theodore Ts'o cc: Jeff King , Todd Zullinger , Git Mailing list Subject: Re: "git rm" seems to do recursive removal even without "-r" In-Reply-To: <20171007210500.s3s5q53qihtf2s32@thunk.org> Message-ID: References: <20171007190402.GH3382@zaya.teonanacatl.net> <20171007192902.ma4s47hn6edwldx5@sigill.intra.peff.net> <20171007193805.a2mwzkweonb6ymdk@sigill.intra.peff.net> <20171007210500.s3s5q53qihtf2s32@thunk.org> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel2.indieserve.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - crashcourse.ca X-Get-Message-Sender-Via: cpanel2.indieserve.net: authenticated_id: rpjday+crashcourse.ca/only user confirmed/virtual account not confirmed X-Authenticated-Sender: cpanel2.indieserve.net: rpjday@crashcourse.ca X-Source: X-Source-Args: X-Source-Dir: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Sat, 7 Oct 2017, Theodore Ts'o wrote: > On Sat, Oct 07, 2017 at 03:43:43PM -0400, Robert P. J. Day wrote: > > > -r > > > Recursively remove the contents of any directories that match > > > ``. > > > > > > or something. > > > > it's been a long week, so take this in the spirit in which it is > > intended ... i think the "git rm" command and its man page should be > > printed out, run through a paper shredder, then set on fire. i can't > > remember the last time i saw such a thoroughly badly-designed, > > badly-documented and non-intuitive utility. > > > > i'm going to go watch football now and try to forget this horror. > > It sounds like the real issue here is that you are interpreting > "recursively" to mean "globbing". Your original complaint seemed to > be a surprise that "git rm book/\*.asc" would delete all of the files > in the directory "book" that ended in .asc, even without the -r flag. > > That's because the operation of matching *.asc is considered > "globbing". Now if there were directories whose name ended in .asc, > then they would only be deleted if the -r flag is given. Deleting > directories and their contents is what is considered "recursive > removal". > > That's not particularly surprising to me as a long-time Unix/Linux > user/developer, since that's how things work in Unix/Linux: > > % touch 1.d 2.d ; mkdir 3.d 4.d > % /bin/ls > 1.d 2.d 3.d 4.d > % rm -r *.d > % touch 1.d 2.d ; mkdir 3.d 4.d > % rm *.d > rm: cannot remove '3.d': Is a directory > rm: cannot remove '4.d': Is a directory > > I'm going to guess that you don't come from a Unix background? yeah, that must be it, i'm a newbie at linux. let's go with that. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================