Re: [PATCH v3 03/12] t1092: expand repository data shape
- From
Elijah Newren <newren@gmail.com>
- Date
- May 18, 2021, 01:49 UTC
- Message-ID
- <CABPp-BG=5huMt2FOrzscNrg9rCpo40we7ms8K=508+Kur0yGnQ@mail.gmail.com>
- In-Reply-To
- <70971b1f9261f2623ad6d6393be1a8e191003eb4.1621017072.git.gitgitgadget@gmail.com>
On Fri, May 14, 2021 at 11:31 AM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 19 quoted lines
> > From: Derrick Stolee <dstolee@microsoft.com> > > As more features integrate with the sparse-index feature, more and more > special cases arise that require different data shapes within the tree > structure of the repository in order to demonstrate those cases. > > Add several interesting special cases all at once instead of sprinkling > them across several commits. The interesting cases being added here are: > > * Add sparse-directory entries on both sides of directories within the > sparse-checkout definition. > > * Add directories outside the sparse-checkout definition who have only > one entry and are the first entry of a directory with multiple > entries. > > Later tests will take advantage of these shapes, but they also deepen > the tests that already exist.
Makes sense. Do we also want to add ones of the form
foo/bar foo.txt
?
Here we'd be particularly looking that if foo is a sparse directory, we want to avoid messing up its order. ('foo' sorts before 'foo.txt', but 'foo/' sorts after, and thus 'foo' the directory should be after 'foo.txt')
Show 37 quoted lines
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> > --- > t/t1092-sparse-checkout-compatibility.sh | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh > index 4f2f09b53a32..98257695979a 100755 > --- a/t/t1092-sparse-checkout-compatibility.sh > +++ b/t/t1092-sparse-checkout-compatibility.sh > @@ -17,7 +17,7 @@ test_expect_success 'setup' ' > echo "after folder1" >g && > echo "after x" >z && > mkdir folder1 folder2 deep x && > - mkdir deep/deeper1 deep/deeper2 && > + mkdir deep/deeper1 deep/deeper2 deep/before deep/later && > mkdir deep/deeper1/deepest && > echo "after deeper1" >deep/e && > echo "after deepest" >deep/deeper1/e && > @@ -25,10 +25,16 @@ test_expect_success 'setup' ' > cp a folder2 && > cp a x && > cp a deep && > + cp a deep/before && > cp a deep/deeper1 && > cp a deep/deeper2 && > + cp a deep/later && > cp a deep/deeper1/deepest && > cp -r deep/deeper1/deepest deep/deeper2 && > + mkdir deep/deeper1/0 && > + mkdir deep/deeper1/0/0 && > + touch deep/deeper1/0/1 && > + touch deep/deeper1/0/0/0 && > git add . && > git commit -m "initial commit" && > git checkout -b base && > -- > gitgitgadget
Looks good.