Re: [PATCH] for-each-repo: do nothing on empty config

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

 



Derrick Stolee <stolee@xxxxxxxxx> writes:

>> I wonder if "false" or "exit 1" would fit the bill.  In any case, a
>> comment may help, perhaps?
>> 
>> 	test_expect_success 'do nothing and succeed on empty/missing config' '
>> 		# if this runs even once, "false" ensures a failure
>> 		git for-each-repo --config=bogus.config -- false
>> 	'
>
> I can add a comment, but keep in mind that this example would run the
> subcommand as "git false". This isn't intended as an arbitrary script
> runner, but a "please run the same Git command on a list of repos".

Ah, that is a good point.

The comment needs to explain:

	# the command fails if it attempts to run even once because
	# 'git false' does not exist

and at that point, it does not have to be spelled 'false'.  It could
be 'no-such-git-subcommand' (and I wonder if that makes the comment
unnecessary).

That reminds me.  If I have ~/bin/git-false and ~/bin on my $PATH,
would this test fail to catch breakage?





[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