Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Jeff King
On Mon, Dec 17, 2012 at 01:05:38AM +, Adam Spiers wrote: t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin, which is on my $PATH. This is different to a similar-looking case reported recently, which was due to

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 2:55 PM, Jeff King p...@peff.net wrote: On Mon, Dec 17, 2012 at 01:05:38AM +, Adam Spiers wrote: t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin, which is on my $PATH. This is

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Torsten Bögershausen
On 20.12.12 16:13, Adam Spiers wrote: On Thu, Dec 20, 2012 at 2:55 PM, Jeff King p...@peff.net wrote: On Mon, Dec 17, 2012 at 01:05:38AM +, Adam Spiers wrote: t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin,

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Jeff King p...@peff.net writes: 2. Loosen the test to look for the presence of checkout, but not fail when other items are present. Bonus points if it makes sure that everything returned starts with check. I think (2) is the ideal solution in terms of behavior, but writing it

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jeff King p...@peff.net writes: 2. Loosen the test to look for the presence of checkout, but not fail when other items are present. Bonus points if it makes sure that everything returned starts with check. I think (2) is the ideal

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Jeff King
On Thu, Dec 20, 2012 at 11:55:45AM -0800, Junio C Hamano wrote: The beginning of such a change may look like the attached patch. [...] +test_fully_contains () { + sort $1 expect.sorted + sort $2 actual.sorted + test $(comm -23 expect.sorted actual.sorted | wc -l) = 0 +} I

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Torsten Bögershausen
On 20.12.12 21:01, Jeff King wrote: +test_fully_contains () { +sort $1 expect.sorted +sort $2 actual.sorted +test $(comm -23 expect.sorted actual.sorted | wc -l) = 0 +} (Good to learn about the comm command, thanks ) What do we think about this: diff --git

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: On 20.12.12 21:01, Jeff King wrote: +test_fully_contains () { + sort $1 expect.sorted + sort $2 actual.sorted + test $(comm -23 expect.sorted actual.sorted | wc -l) = 0 +} (Good to learn about the comm command, thanks ) What do we think

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Jeff King
On Thu, Dec 20, 2012 at 09:53:06PM +0100, Torsten Bögershausen wrote: (Good to learn about the comm command, thanks ) What do we think about this: diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 3cd53f8..82eeba7 100755 --- a/t/t9902-completion.sh +++

$PATH pollution and t9902-completion.sh

2012-12-16 Thread Adam Spiers
t/t9902-completion.sh is currently failing for me because I happen to have a custom shell-script called git-check-email in ~/bin, which is on my $PATH. This is different to a similar-looking case reported recently, which was due to an unclean working tree: