mbox series

[GSoC,0/3] clone: convert explicit dir traversal to dir-iterator

Message ID 20190223190309.6728-1-matheus.bernardino@usp.br (mailing list archive)
Headers show
Series clone: convert explicit dir traversal to dir-iterator | expand

Message

Matheus Tavares Feb. 23, 2019, 7:03 p.m. UTC
Add pedantic option to dir_iterator_begin at dir-iterator.c and convert
explicit recursive directory traversal at copy_or_link_directory
(builtin/clone.c) to the dir-iterator API.

This is my microproject for GSoC 2019. Idea taken from
https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal

Build: https://travis-ci.org/MatheusBernardino/git/builds/497512561

Matheus Tavares (3):
  dir-iterator: add pedantic option to dir_iterator_begin
  clone: extract function from copy_or_link_directory
  clone: use dir-iterator to avoid explicit dir traversal

 builtin/clone.c      | 72 ++++++++++++++++++++++++++++----------------
 dir-iterator.c       | 23 ++++++++++++--
 dir-iterator.h       | 16 ++++++++--
 refs/files-backend.c |  2 +-
 4 files changed, 81 insertions(+), 32 deletions(-)

Comments

Matheus Tavares Feb. 23, 2019, 7:07 p.m. UTC | #1
On Sat, Feb 23, 2019 at 4:03 PM Matheus Tavares
<matheus.bernardino@usp.br> wrote:
>
> Add pedantic option to dir_iterator_begin at dir-iterator.c and convert
> explicit recursive directory traversal at copy_or_link_directory
> (builtin/clone.c) to the dir-iterator API.
>
> This is my microproject for GSoC 2019. Idea taken from
> https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal
>
> Build: https://travis-ci.org/MatheusBernardino/git/builds/497512561
>
> Matheus Tavares (3):
>   dir-iterator: add pedantic option to dir_iterator_begin
>   clone: extract function from copy_or_link_directory
>   clone: use dir-iterator to avoid explicit dir traversal
>
>  builtin/clone.c      | 72 ++++++++++++++++++++++++++++----------------
>  dir-iterator.c       | 23 ++++++++++++--
>  dir-iterator.h       | 16 ++++++++--
>  refs/files-backend.c |  2 +-
>  4 files changed, 81 insertions(+), 32 deletions(-)
>

Sadly, I forgot the v2 tag, but this is a v2. Should I resent the
series with [PATCH v2 ...] or is it ok?

Matheus Tavares

> --
> 2.20.1
>
Ævar Arnfjörð Bjarmason Feb. 23, 2019, 8:10 p.m. UTC | #2
On Sat, Feb 23 2019, Matheus Tavares Bernardino wrote:

> On Sat, Feb 23, 2019 at 4:03 PM Matheus Tavares
> <matheus.bernardino@usp.br> wrote:
>>
>> Add pedantic option to dir_iterator_begin at dir-iterator.c and convert
>> explicit recursive directory traversal at copy_or_link_directory
>> (builtin/clone.c) to the dir-iterator API.
>>
>> This is my microproject for GSoC 2019. Idea taken from
>> https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal
>>
>> Build: https://travis-ci.org/MatheusBernardino/git/builds/497512561
>>
>> Matheus Tavares (3):
>>   dir-iterator: add pedantic option to dir_iterator_begin
>>   clone: extract function from copy_or_link_directory
>>   clone: use dir-iterator to avoid explicit dir traversal
>>
>>  builtin/clone.c      | 72 ++++++++++++++++++++++++++++----------------
>>  dir-iterator.c       | 23 ++++++++++++--
>>  dir-iterator.h       | 16 ++++++++--
>>  refs/files-backend.c |  2 +-
>>  4 files changed, 81 insertions(+), 32 deletions(-)
>>
>
> Sadly, I forgot the v2 tag, but this is a v2. Should I resent the
> series with [PATCH v2 ...] or is it ok?

It's fine. No need to resend.
Thomas Gummerer Feb. 23, 2019, 9:59 p.m. UTC | #3
On 02/23, Matheus Tavares wrote:
> Add pedantic option to dir_iterator_begin at dir-iterator.c and convert
> explicit recursive directory traversal at copy_or_link_directory
> (builtin/clone.c) to the dir-iterator API.

Thanks for another iteration of this.

To make life easier for reviewers, please include a link (or the
message-ID) to all previous iteration of the series.  We often use
links to the public-inbox mirror for this,
e.g. https://public-inbox.org/git/20190215154913.18800-1-matheus.bernardino@usp.br/.

This helps reviewers go back quickly to previous iterations of the
series, and refresh their memory on the comments that were left
there.

You can also use the --in-reply-to option in 'git send-email' to chain
the threads, which also makes life easier for reviewers.

An additional way to help reviewers is to include a 'range-diff'
between the previous iteration of the series, and the current
iteration.  See the 'git range-diff' command or the '--range-diff'
option to 'git format-patch' for that.  That helps reviewers to
quickly see what changed between iterations, so that they don't have
to re-review everything, if they can still remember the last round
well enough.

I also added Christian Couder back to the Cc list, as he commented on
the RFC.  It's good to keep people that commented on the series in Cc,
as they have shown some interest in the series, so keeping them in the
Cc list helps highlight those emails for them, and makes it more
likely that the patches get reviewed quickly.

> This is my microproject for GSoC 2019. Idea taken from
> https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal
> 
> Build: https://travis-ci.org/MatheusBernardino/git/builds/497512561
> 
> Matheus Tavares (3):
>   dir-iterator: add pedantic option to dir_iterator_begin
>   clone: extract function from copy_or_link_directory
>   clone: use dir-iterator to avoid explicit dir traversal
> 
>  builtin/clone.c      | 72 ++++++++++++++++++++++++++++----------------
>  dir-iterator.c       | 23 ++++++++++++--
>  dir-iterator.h       | 16 ++++++++--
>  refs/files-backend.c |  2 +-
>  4 files changed, 81 insertions(+), 32 deletions(-)
> 
> -- 
> 2.20.1
>
Matheus Tavares Feb. 24, 2019, 4:34 p.m. UTC | #4
On Sat, Feb 23, 2019 at 6:59 PM Thomas Gummerer <t.gummerer@gmail.com> wrote:
>
> On 02/23, Matheus Tavares wrote:
> > Add pedantic option to dir_iterator_begin at dir-iterator.c and convert
> > explicit recursive directory traversal at copy_or_link_directory
> > (builtin/clone.c) to the dir-iterator API.
>
> Thanks for another iteration of this.
>
> To make life easier for reviewers, please include a link (or the
> message-ID) to all previous iteration of the series.  We often use
> links to the public-inbox mirror for this,
> e.g. https://public-inbox.org/git/20190215154913.18800-1-matheus.bernardino@usp.br/.
>
> This helps reviewers go back quickly to previous iterations of the
> series, and refresh their memory on the comments that were left
> there.
>
> You can also use the --in-reply-to option in 'git send-email' to chain
> the threads, which also makes life easier for reviewers.
>
> An additional way to help reviewers is to include a 'range-diff'
> between the previous iteration of the series, and the current
> iteration.  See the 'git range-diff' command or the '--range-diff'
> option to 'git format-patch' for that.  That helps reviewers to
> quickly see what changed between iterations, so that they don't have
> to re-review everything, if they can still remember the last round
> well enough.
>
> I also added Christian Couder back to the Cc list, as he commented on
> the RFC.  It's good to keep people that commented on the series in Cc,
> as they have shown some interest in the series, so keeping them in the
> Cc list helps highlight those emails for them, and makes it more
> likely that the patches get reviewed quickly.
>

Ok, thanks for all the tips, Thomas! Now I started to notice the
public-inbox references for previous iterations in other people's
patches, too.

I am part of a FLOSS group here at USP called FLUSP
(https://flusp.ime.usp.br/), and I plan to write some posts on our
website about what I am learning in the git community so that other
people in the group can have as a base if they decide to start
contributing to git too. So all this tips and explanations are of
great value, not only for me but for others here! Thanks a lot.

> > This is my microproject for GSoC 2019. Idea taken from
> > https://git.github.io/SoC-2019-Microprojects/#use-dir-iterator-to-avoid-explicit-recursive-directory-traversal
> >
> > Build: https://travis-ci.org/MatheusBernardino/git/builds/497512561
> >
> > Matheus Tavares (3):
> >   dir-iterator: add pedantic option to dir_iterator_begin
> >   clone: extract function from copy_or_link_directory
> >   clone: use dir-iterator to avoid explicit dir traversal
> >
> >  builtin/clone.c      | 72 ++++++++++++++++++++++++++++----------------
> >  dir-iterator.c       | 23 ++++++++++++--
> >  dir-iterator.h       | 16 ++++++++--
> >  refs/files-backend.c |  2 +-
> >  4 files changed, 81 insertions(+), 32 deletions(-)
> >
> > --
> > 2.20.1
> >
Thomas Gummerer Feb. 24, 2019, 9:07 p.m. UTC | #5
On 02/24, Matheus Tavares Bernardino wrote:
> I am part of a FLOSS group here at USP called FLUSP
> (https://flusp.ime.usp.br/), and I plan to write some posts on our
> website about what I am learning in the git community so that other
> people in the group can have as a base if they decide to start
> contributing to git too. So all this tips and explanations are of
> great value, not only for me but for others here! Thanks a lot.

Great to hear!  Please do post links to those posts on the mailing
list as well, I'm interested in reading them.