Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 1/4] Move remove_path() into libgit.a

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:50

We seem to have variants of the seme theme in many places.

 * builtin-apply.c::remove_file()
 * builtin-rm.c::remove_file() -- this one leaks the strdup result
 * refs.c::remove_empty_dir_recursive()
 * unpack-trees.c::unlink_entry() 
 * mrege-recursive.c::remove_path()

It would be nicer to consolidate their "remove the now
potentially empty directories recursively" part in a single
function and have them call it.

Some of them try to be more efficient by not allocating an extra
string (because they know the string supplied by the caller is a
fair game), so the clean-up might be slightly involved, but I
think it is worth it.

 
	
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help