Subject: Re: [PATCH] rm: added --directory (-d) option
From: Eric Blake <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Fri, 11 Jun 2010 09:13:19 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

On 03/07/2010 12:47 PM, [email-masked] wrote:
> Hello again,

Hello,

Sorry for the long delay in reading through my inbox.  It looks like
this was written before we moved to the debbugs interface, making it
easier to lose in the mists of time; but now that I am responding, it
will get an id number to help us remember it.

> 
> I have finally completed my --directory (-d) feature, like the FreeBSD one.

Well, first, I would need to understand if there is any difference
between 'rmdir dir' (specified by POSIX) and 'rm -d dir' - if they are
no different, then how do you justify the extension?  But, since there
are other implementations out there that do it, it might be nice to
support, if only so GNU tools can serve as drop-in replacement for
vendor tools.

> The directory option deletes a directory only if the directory in question is
> empty. This is a safer alternative to the recursive option is some cases where
> you don't want to delete unempty directories.
> 
> I have documented the features. Although I am not the best technical writer, I
> hope that what I have done is adequate. One thing that I have neglected to do,
> intentionally, is to write an automated test. I am not skilled enough or
> confident enough in my Perl or shell scripting ability to write such a test.

Thanks very much for submitting a patch, and especially for including
documentation as part of the patch.  If others on this list agree that
this is worth having, there's still one hurdle to jump through - your
patch is too long to be considered trivial, so you would have to assign
copyright to the FSF, or else we would have to reimplement the patch
from scratch based on your description.  I have not looked at your
patch, for that reason.  Let us know if this is still something you are
willing to pursue.

> 
> I would love to hear what I could have done better, or possibly what I have
> done wrong. Any comments on my code are very much appreciated. That is a big
> part of why I am doing this is to become a better programmer.
> 
> Thank you, and with out further ado, here is the patch.
> 

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org