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 > +++ b/t/t9902-co

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Torsten Bögershausen 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 ) > Wha

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 a

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

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King 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

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Junio C Hamano
Jeff King 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 > may be

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 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

Re: $PATH pollution and t9902-completion.sh

2012-12-20 Thread Adam Spiers
On Thu, Dec 20, 2012 at 2:55 PM, Jeff King 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 different to a

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

$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: http://thread.gmane.org/gmane.comp.ver