Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-17 Thread Junio C Hamano
Junio C Hamano writes: >> Do we want to use approxidate_careful here to catch other junk? > > We can catch a misspelt argument or configuration value that way. > That would be a good idea. -- >8 -- Subject: date.c: add parse_expiry_date() "git reflog --expire=all" tries to expire reflog entries

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-17 Thread Michael Haggerty
On 04/17/2013 01:22 AM, Junio C Hamano wrote: > Michael Haggerty writes: > >> would be that it expires *everything*. But in fact it seems to only >> expire things that are at least one second old, which doesn't seem at >> all useful in the real world. "--expire=all" is accepted without >> compl

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-16 Thread Junio C Hamano
Jeff King writes: > On Tue, Apr 16, 2013 at 04:22:25PM -0700, Junio C Hamano wrote: > >> +static void parse_expire_value(const char *value, unsigned long *expire) >> +{ >> +if (!strcmp(value, "never") || !strcmp(value, "false")) >> +*expire = 0; >> +else if (!strcmp(value, "al

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-16 Thread Jeff King
On Tue, Apr 16, 2013 at 04:22:25PM -0700, Junio C Hamano wrote: > +static void parse_expire_value(const char *value, unsigned long *expire) > +{ > + if (!strcmp(value, "never") || !strcmp(value, "false")) > + *expire = 0; > + else if (!strcmp(value, "all") || !strcmp(value, "no

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-16 Thread Junio C Hamano
Michael Haggerty writes: > would be that it expires *everything*. But in fact it seems to only > expire things that are at least one second old, which doesn't seem at > all useful in the real world. "--expire=all" is accepted without > complaint but doesn't do what one would hope. Perhaps that

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-16 Thread Michael Haggerty
On 04/15/2013 07:39 PM, Junio C Hamano wrote: > Michael Haggerty writes: >> How can I get rid of the sleeps in these tests? > > Would test-chmtime help? Maybe I should take a step back and ask why it isn't easier to expire things regardless of age, which is sometimes a reasonable thing to do eve

Re: [PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-15 Thread Junio C Hamano
Michael Haggerty writes: > A packed reference can be overridden by a loose reference, in which > case the packed reference is obsolete and is never used. The object > pointed to by such a reference can be garbage collected. Since > d66da478f2, this could lead to the emission of a spurious error

[PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-14 Thread Michael Haggerty
A packed reference can be overridden by a loose reference, in which case the packed reference is obsolete and is never used. The object pointed to by such a reference can be garbage collected. Since d66da478f2, this could lead to the emission of a spurious error message: error: refs/heads/ma