From: Daniel Ferreira <bnmvco@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, sbeller@google.com, pclouds@gmail.com,
mhagger@alum.mit.edu, peff@peff.net,
Daniel Ferreira <bnmvco@gmail.com>
Subject: [PATCH v6 0/5] [GSoC] remove_subtree(): reimplement using iterators
Date: Sun, 2 Apr 2017 01:35:21 -0300 [thread overview]
Message-ID: <1491107726-21504-1-git-send-email-bnmvco@gmail.com> (raw)
This is the sixth version of a patch series that implements the GSoC
microproject of converting a recursive call to readdir() to use dir_iterator.
v1: https://public-inbox.org/git/CAGZ79kZwT-9mHTiOJ5CEjk2wDFkn6+NcogjX0=vjhsAh16ANYg@mail.gmail.com/T/#t
v2: https://public-inbox.org/git/CACsJy8Dxh-QPBBLfaFWPAWUsbA9GVXA7x+mXLjEvYKhk1zOpig@mail.gmail.com/T/#t
v3: https://public-inbox.org/git/CAGZ79kYtpmURSQWPumobA=e3JBFjKhWCdv_LPhKCd71ZRwMovA@mail.gmail.com/T/#t
v4: https://public-inbox.org/git/1490747533-89143-1-git-send-email-bnmvco@gmail.com/T/#e437a63e0c22c00c69b5d92977c9b438ed2b9fd3a
v5: https://public-inbox.org/git/1490844730-47634-1-git-send-email-bnmvco@gmail.com/T/#m2323f15e45de699f2e09364f40a62e17047cf453
Back in v5, Michael had a number of suggestions, all of which were applied
to this version (including a slightly modified version of his "biggish rewrite"
project to make dir_iterator's state machine simpler). The only suggestion that
did not make it into this series was that of not traversing into subdirectories,
since I believe it would be better off in another series that actually required
that feature (that is, I do not want a series to implement a feature it will
not need). The same goes for Junio's thought on a flag to list *only* directories
and no files on the v4 discussion.
Junio and Peff's comments about how to write to files in the tests were also
considered, and the tests were adjusted.
I chose to squash both the state machine refactor and the addition of the
new flags in a single commit. I do not know whether you will feel this is
the right choice but it seemed natural, since most of the state machine's
new logic would not even make sense without encompassing the new features.
I am, of course, open for feedback on this decision.
To Michael and Duy, thanks -- really -- for the encouraging comments! :)
I never regarded this microproject purely as a means to fulfill a GSoC
requirement, but as a way to get to learn more about Git, so I'm surely
not giving it up.
Once again, thanks for all the previous reviews,
Daniel.
Daniel Ferreira (5):
dir_iterator: add tests for dir_iterator API
remove_subtree(): test removing nested directories
dir_iterator: add helpers to dir_iterator_advance
dir_iterator: refactor state machine model
remove_subtree(): reimplement using iterators
Makefile | 1 +
dir-iterator.c | 190 ++++++++++++++++++++++++++--------------
dir-iterator.h | 28 ++++--
entry.c | 38 +++-----
refs/files-backend.c | 2 +-
t/helper/.gitignore | 1 +
t/helper/test-dir-iterator.c | 32 +++++++
t/t0065-dir-iterator.sh | 109 +++++++++++++++++++++++
t/t2000-checkout-cache-clash.sh | 11 +++
9 files changed, 312 insertions(+), 100 deletions(-)
create mode 100644 t/helper/test-dir-iterator.c
create mode 100755 t/t0065-dir-iterator.sh
--
2.7.4 (Apple Git-66)
next reply other threads:[~2017-04-02 4:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-02 4:35 Daniel Ferreira [this message]
2017-04-02 4:35 ` [PATCH v6 1/5] dir_iterator: add tests for dir_iterator API Daniel Ferreira
2017-04-02 4:35 ` [PATCH v6 2/5] remove_subtree(): test removing nested directories Daniel Ferreira
2017-04-02 4:35 ` [PATCH v6 3/5] dir_iterator: add helpers to dir_iterator_advance Daniel Ferreira
2017-04-02 4:35 ` [PATCH v6 4/5] dir_iterator: refactor state machine model Daniel Ferreira
2017-04-02 4:46 ` Daniel Ferreira (theiostream)
2017-04-02 5:35 ` Michael Haggerty
2017-04-02 4:35 ` [PATCH v6 5/5] remove_subtree(): reimplement using iterators Daniel Ferreira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491107726-21504-1-git-send-email-bnmvco@gmail.com \
--to=bnmvco@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).