Re: [PATCH v3 1/2] t7501: add tests for --include and --only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux