Re: [PATCH] test-lib: fix "$remove_trash" regression and match_pattern_list() bugs

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

>> Whatever the expansion mechanism, I do think it's worth having callers
>> quote "$GIT_SKIP_TESTS" and then performing the expansion within
>> match_pattern_list. Then the nasty mechanics are all in that one place.
>
> I think it's rather clean to not quote it, i.e. to have the loop get a
> list of item and then things to match, it would also make it easier to
> e.g. port it to a native C program.

Sorry, I am not sure how it can work without quoting $GIT_SKIP_TESTS
and exposing the details of how we disable globbing when the caller
calls match_pattern_list.

A list of item in $GIT_SKIP_TESTS would not be able to pass t?000 in
it intact to the loop that processes each of the item on the list.

	for pattern in $GIT_SKIP_TESTS
	do
		attempt to match with $pattern
	done

will see t5000 in $pattern due to globbing.  It's not like "$@"
trick can be applied to any plain variable.




[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