From: Victoria Dye <vdye@github.com>
To: Shuqi Liang <cheskaqiqi@gmail.com>, git@vger.kernel.org
Cc: gitster@pobox.com
Subject: Re: [PATCH v3 2/3] t1092: add tests for `git check-attr`
Date: Tue, 11 Jul 2023 13:47:18 -0700 [thread overview]
Message-ID: <959d9ee6-b2b6-3a2f-c597-856bdaef077b@github.com> (raw)
In-Reply-To: <20230711133035.16916-3-cheskaqiqi@gmail.com>
Shuqi Liang wrote:
> Add smudge/clean filters in .gitattributes files inside the affected
> sparse directories in test 'merge with conflict outside cone', make sure
> it behaves as expected when path is outside of sparse-checkout.
>
> Add tests for `git check-attr`, make sure it behaves as expected when
> path is both inside or outside of sparse-checkout definition.
>
> Helped-by: Victoria Dye <vdye@github.com>
> Signed-off-by: Shuqi Liang <cheskaqiqi@gmail.com>
> ---
> t/t1092-sparse-checkout-compatibility.sh | 40 ++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
> index 8a95adf4b5..839e08d8dd 100755
> --- a/t/t1092-sparse-checkout-compatibility.sh
> +++ b/t/t1092-sparse-checkout-compatibility.sh
> @@ -1006,6 +1006,17 @@ test_expect_success 'merge with conflict outside cone' '
>
> test_all_match git checkout -b merge-tip merge-left &&
> test_all_match git status --porcelain=v2 &&
> +
> + echo "a filter=rot13" >>.gitattributes &&
> + run_on_sparse mkdir folder1 &&
> + run_on_all cp ../.gitattributes ./folder1 &&
> + git -C full-checkout add folder1/.gitattributes &&
> + run_on_sparse git add --sparse folder1/.gitattributes &&
> + run_on_all git commit -m "add .gitattributes" &&
> + test_sparse_match git sparse-checkout reapply &&
> + git config filter.rot13.clean "tr 'A-Za-z' 'N-ZA-Mn-za-m'" &&
> + git config filter.rot13.smudge "tr 'A-Za-z' 'N-ZA-Mn-za-m'" &&
> +
In general, we try to add tests demonstrating behavior in context with the
implementation of that behavior. Patch 1 [1] contains the update to
attribute reading that's being tested here, so this block should be moved
there accordingly.
Also, does this test fail before patch 1 but succeed after? It's a bit
difficult to tell how this demonstrates that the in-sparse-directory
`.gitattributes` is applied properly now but wasn't before. An
additional comment in the test or commit message would be helpful for
understanding it better.
[1] https://lore.kernel.org/git/20230711133035.16916-2-cheskaqiqi@gmail.com/
> test_all_match test_must_fail git merge -m merge merge-right &&
> test_all_match git status --porcelain=v2 &&
>
next prev parent reply other threads:[~2023-07-11 20:47 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-01 6:48 [PATCH v1 0/3] check-attr: integrate with sparse-index Shuqi Liang
2023-07-01 6:48 ` [PATCH v1 1/3] attr.c: read attributes in a sparse directory Shuqi Liang
2023-07-03 17:59 ` Victoria Dye
2023-07-01 6:48 ` [PATCH v1 2/3] t1092: add tests for `git check-attr` Shuqi Liang
2023-07-03 18:11 ` Victoria Dye
2023-07-01 6:48 ` [PATCH v1 3/3] check-attr: integrate with sparse-index Shuqi Liang
2023-07-03 18:21 ` Victoria Dye
2023-07-07 15:18 ` [PATCH v2 0/3] " Shuqi Liang
2023-07-07 15:18 ` [PATCH v2 1/3] Enable gitattributes read from sparse directories Shuqi Liang
2023-07-07 23:15 ` Junio C Hamano
2023-07-07 15:18 ` [PATCH v2 2/3] t1092: add tests for `git check-attr` Shuqi Liang
2023-07-07 15:18 ` [PATCH v2 3/3] check-attr: integrate with sparse-index Shuqi Liang
2023-07-11 13:30 ` [PATCH v3 0/3] " Shuqi Liang
2023-07-11 13:30 ` [PATCH v3 1/3] attr.c: read attributes in a sparse directory Shuqi Liang
2023-07-11 21:15 ` Junio C Hamano
2023-07-11 22:08 ` Junio C Hamano
2023-07-13 20:22 ` Shuqi Liang
2023-07-13 20:13 ` Shuqi Liang
2023-07-11 21:24 ` Victoria Dye
2023-07-11 13:30 ` [PATCH v3 2/3] t1092: add tests for `git check-attr` Shuqi Liang
2023-07-11 18:52 ` Junio C Hamano
2023-07-11 20:47 ` Victoria Dye [this message]
2023-07-11 13:30 ` [PATCH v3 3/3] check-attr: integrate with sparse-index Shuqi Liang
2023-07-11 20:07 ` Junio C Hamano
2023-07-11 16:56 ` [PATCH v3 0/3] " Junio C Hamano
2023-07-18 23:29 ` [PATCH v4 " Shuqi Liang
2023-07-18 23:29 ` [PATCH v4 1/3] t1092: add tests for 'git check-attr' Shuqi Liang
2023-07-20 18:43 ` Victoria Dye
2023-07-18 23:29 ` [PATCH v4 2/3] attr.c: read attributes in a sparse directory Shuqi Liang
2023-07-20 20:18 ` Victoria Dye
2023-08-03 16:22 ` Glen Choo
2023-08-15 8:05 ` Shuqi Liang
2023-07-18 23:29 ` [PATCH v4 3/3] check-attr: integrate with sparse-index Shuqi Liang
2023-08-11 14:22 ` [PATCH v5 0/3] " Shuqi Liang
2023-08-11 14:22 ` [PATCH v5 1/3] t1092: add tests for 'git check-attr' Shuqi Liang
2023-08-11 14:22 ` [PATCH v5 2/3] attr.c: read attributes in a sparse directory Shuqi Liang
2023-08-11 14:22 ` [PATCH v5 3/3] check-attr: integrate with sparse-index Shuqi Liang
2023-08-14 16:24 ` [PATCH v5 0/3] " Victoria Dye
2023-08-14 17:10 ` Junio C Hamano
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=959d9ee6-b2b6-3a2f-c597-856bdaef077b@github.com \
--to=vdye@github.com \
--cc=cheskaqiqi@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.