Thread (10 messages) flat view 10 messages, 4 authors, 2016-06-15

Re: [PATCH] Fix memleak and the implementation of remove_file in builtin-rm.c

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:24

Alex Riesen [off-list ref] 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...  ;-)
 
quoted hunk ↗ jump to hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help