Thread (49 messages) flat view 49 messages, 2 authors, 2016-06-15

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

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:56:51

On 04/15/2013 07:39 PM, Junio C Hamano wrote:
Michael Haggerty [off-list ref] writes:
quoted
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
even outside of test suites.  In particular, it seem to me that the most
obvious interpretation of

	git reflog expire --expire=now --all

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.  Something like
"--expire=$(($(date +%s)+3600))" works, but it is not very convenient
(is it portable?).

I guess I can use test-chmtime for my particular test, though I will
have to pass it the explicit names of the logfile(s), like

    find .git/logs -type f -print0 | xargs -0 test-chmtime =-60

I guess that's what I'll do if no better solution comes up.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help