Re: [PATCH 2/2] checkout: die() on ambiguous tracking branches

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

 



On 27.11.2019 15:46, Derrick Stolee wrote:
+	if (!remote && (num_matches > 1)) {

I believe the parentheses around "num_matched > 1" are not needed here.

Fixed in v2.

I like that you added a test for this non-obvious situation. One thing that
would help ensure that your test is checking the right thing is to redirect
stderr to a file and grep for the die() message you included. Something like:

	test_must_fail git checkout ambiguous_branch_and_file 2>err &&
	test_i18ngrep "matched multiple (2) remote tracking branches" err &&

This is a good idea, thanks! Added in v2.



[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