Re: [PATCH v2] [GSoC] remove_subtree(): reimplement using iterators

2017-03-25 Thread Duy Nguyen
On Sat, Mar 25, 2017 at 7:13 PM, Daniel Ferreira (theiostream) wrote: > You are correct, which shows that since all tests pass, we need to > come up with better cases for this function. > > As for a solution, I believe that the best way to go for it is to > dir_iterator's

Re: [PATCH v2] [GSoC] remove_subtree(): reimplement using iterators

2017-03-25 Thread Daniel Ferreira (theiostream)
You are correct, which shows that since all tests pass, we need to come up with better cases for this function. As for a solution, I believe that the best way to go for it is to dir_iterator's implementation to have an "Option to iterate over directory paths before vs. after their contents"

Re: [PATCH v2] [GSoC] remove_subtree(): reimplement using iterators

2017-03-25 Thread Duy Nguyen
On Sat, Mar 25, 2017 at 6:27 PM, Daniel Ferreira wrote: > Use dir_iterator to traverse through remove_subtree()'s directory tree, > avoiding the need for recursive calls to readdir(). Simplify > remove_subtree()'s code. > > A conversion similar in purpose was previously done at

[PATCH v2] [GSoC] remove_subtree(): reimplement using iterators

2017-03-25 Thread Daniel Ferreira
Use dir_iterator to traverse through remove_subtree()'s directory tree, avoiding the need for recursive calls to readdir(). Simplify remove_subtree()'s code. A conversion similar in purpose was previously done at 46d092a ("for_each_reflog(): reimplement using iterators", 2016-05-21).