Re: [PATCH v3 1/2] t7501: add tests for --include and --only
- From
- phillip.wood123@gmail.com <phillip.wood123@gmail.com>
- Date
- Jan 11, 2024, 16:33 UTC
- Message-ID
- <ba8824a3-caa9-4de2-bb80-3e592ec62b92@gmail.com>
- In-Reply-To
- <20240110163622.51182-4-shyamthakkar001@gmail.com>
On 10/01/2024 16:35, Ghanshyam Thakkar wrote:
I don't have much to add to what Junio said, I've just left one comment below
Show 10 quoted lines
> +test_expect_success '--only excludes staged changes' ' > + echo content >file && > + echo content >baz && > + git add baz && > + git commit --only -m "file" file && > + > + git diff --name-only >actual && > + test_must_be_empty actual && > + git diff --name-only --staged >actual && > + test_grep "baz" actual
using test_grep feels a bit weak here, I think it would be better to use test_cmp to ensure that there are no other staged changes.
Best Wishes
Phillip