Re: [PATCH] Fix memleak and the implementation of remove_file in builtin-rm.c
Alex Riesen <raa.lkml@gmail.com> wrote:
> It is the same as in merge-recursive, but they're so small so unless
> we get a special file with such random routines there is no much point
> exporting it. Actually, we do seem to have such a file: dir.c. It is
> already plagued by file_exists kind of things, why not remove_path...
Yea. I'm thinking remove_path should migrate to dir.c. Hell,
we already have rm -rf as remove_dir_recursively() in dir.c.
remove_path is its long-lost soul mate. I'm not applying this
builtin-rm fix, and am hoping you'll rewrite it around a move
of remove_path to dir.c... ;-)
Show 8 quoted lines
> diff --git a/builtin-rm.c b/builtin-rm.c
> index fdac34f..910a34d 100644
> --- a/builtin-rm.c
> +++ b/builtin-rm.c
> @@ -31,22 +31,18 @@ static void add_list(const char *name)
>
> static int remove_file(const char *name)
> {--
Shawn.