mbox series

[WIP,RFC,0/7] clone: dir iterator refactoring with tests

Message ID 20190226002625.13022-1-avarab@gmail.com (mailing list archive)
Headers show
Series clone: dir iterator refactoring with tests | expand

Message

Ævar Arnfjörð Bjarmason Feb. 26, 2019, 12:26 a.m. UTC
On Mon, Feb 25 2019, Duy Nguyen wrote:

> On Sun, Feb 24, 2019 at 9:45 PM Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> ..
>> Can't the utility function we're moving to just be made to be
>> bug-compatible with what we're doing now with symlinks?
>
> I haven't really followed closely this thread. But I think the first
> step should be bug-compatible (it really depends if you count the
> current behavior "buggy"). Then add improvements on top if there's
> still time or strong consensus. It's easier to bisect that way at
> least.

Here's an attempt at doing that. This was hastily done and as seen
from the commit messages I don't really know what the intention with
some of this stuff is / didn't have time to dig, e.g. why the API is
now using lstat() instead of stat().

But as far as I can tell this is a series where up to patch 5 we
retain the current behavior 100%. And in 6/7 and 7/7 introduce the
behavior changes in the previous 3/3 which I've been commenting on.

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

Ævar Arnfjörð Bjarmason (4):
  dir-iterator: use stat() instead of lstat()
  clone: test for our behavior on odd objects/* content
  clone: stop ignoring dotdirs in --local etc. clone
  clone: break cloning repos that have symlinks in them

 builtin/clone.c            | 72 ++++++++++++++++++++++++--------------
 dir-iterator.c             | 23 ++++++++++--
 dir-iterator.h             | 16 +++++++--
 refs/files-backend.c       |  2 +-
 t/t5604-clone-reference.sh | 40 +++++++++++++++++++++
 5 files changed, 121 insertions(+), 32 deletions(-)