From: phillip.wood123@gmail.com Date: Thu, 11 Jan 2024 16:33:57 GMT Subject: Re: [PATCH v3 1/2] t7501: add tests for --include and --only Message-ID: 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 > +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