Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-21 Thread Daniel Ferreira (theiostream)
Hi there! I'm happy to see this series has gotten renewed attention. The series was fine per se, and it even got through to the pu branch. But then it got ejected since it conflicted non-trivially with another patch series that was added along the way (see https://lwn.net/Articles/724166/). At tha

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-21 Thread Thomas Gummerer
On 02/21, Matheus Tavares Bernardino wrote: > Ok, I think I'm almost there and I should be able to send a v2 on the > weekend. But again, a few questions arose while I'm coding v2. Please, > see inline. > > On Tue, Feb 19, 2019 at 8:45 PM Thomas Gummerer wrote: > > > > On 02/19, Matheus Tavares B

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-20 Thread Matheus Tavares Bernardino
Ok, I think I'm almost there and I should be able to send a v2 on the weekend. But again, a few questions arose while I'm coding v2. Please, see inline. On Tue, Feb 19, 2019 at 8:45 PM Thomas Gummerer wrote: > > On 02/19, Matheus Tavares Bernardino wrote: > > Ok, I agree. I noticed copy_or_link_d

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-19 Thread Thomas Gummerer
On 02/19, Matheus Tavares Bernardino wrote: > On Mon, Feb 18, 2019 at 8:35 PM Thomas Gummerer wrote: > > > Also, I just noticed that dir-iterator follows hidden paths while > > > copy_or_link_directory don't. Maybe another option to add for > > > dir-iterator? > > > > That feels like quite a speci

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-19 Thread Matheus Tavares Bernardino
On Mon, Feb 18, 2019 at 8:35 PM Thomas Gummerer wrote: > > > > > You are right. I didn't know the differences from lstat and stat. And > > reflecting on this now, I realize that the problem is even deeper: > > copy_or_link_directory follows symlinks but dir-iterator don't, so I > > cannot use dir-

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-18 Thread Thomas Gummerer
On 02/18, Matheus Tavares Bernardino wrote: > On Sat, Feb 16, 2019 at 12:38 PM Thomas Gummerer wrote: > > > > On 02/15, Matheus Tavares wrote: > > > - struct dirent *de; > > > - struct stat buf; > > > int src_len, dest_len; > > > - DIR *dir; > > > - > > > - dir = opendir(src-

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-18 Thread Matheus Tavares Bernardino
On Sat, Feb 16, 2019 at 12:38 PM Thomas Gummerer wrote: > > On 02/15, Matheus Tavares wrote: > > Replace usage of opendir/readdir/closedir API to traverse directories > > recursively, at copy_or_link_directory function, by the dir-iterator > > API. > > > > Signed-off-by: Matheus Tavares > > --- >

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-16 Thread Thomas Gummerer
On 02/15, Matheus Tavares wrote: > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. > > Signed-off-by: Matheus Tavares > --- > builtin/clone.c | 39 +++ > 1 file

Re: [GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-15 Thread Christian Couder
On Fri, Feb 15, 2019 at 5:39 PM Matheus Tavares wrote: > > Replace usage of opendir/readdir/closedir API to traverse directories > recursively, at copy_or_link_directory function, by the dir-iterator > API. You may want to add that this simplifies the code and avoid recursive calls of copy_or_lin

[GSoC][PATCH 2/2] clone: use dir-iterator to avoid explicit dir traversal

2019-02-15 Thread Matheus Tavares
Replace usage of opendir/readdir/closedir API to traverse directories recursively, at copy_or_link_directory function, by the dir-iterator API. Signed-off-by: Matheus Tavares --- builtin/clone.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff