Re: [Outreachy PATCH] credential-store: add lockTimeout config option
- From
- Okhuomon Ajayi <okhuomonajayi54@gmail.com>
- Date
- Oct 16, 2026, 21:09 UTC
- Message-ID
- <CAFpMFfB5muJzEit4sGa5iuQBSvBsKS6gC4xALKV8F8bpvpx5ZQ@mail.gmail.com>
- In-Reply-To
- <xmqqcxtaonu2.fsf@gitster.g>
On Thu, Oct 15, 2026 at 6:50 PM Junio C Hamano <gitster@pobox.com> wrote:
> As it is necessary to keep the above two in sync forever, it may > make sense to do this instead: > > for v lockTimeout lockTimeoutMS
Thanks, I've turned the two tests into a loop like this for v2, and wrapped the long lines in credential-store.c.
> Ahh, the key to this test is that we make sure "in 0 ms" part of the > error message does not say "in 500 ms" to ensure which of the two > variables are being used. It is not like the credential-store command > would fail with 0ms timeout but succees with 500ms timeout.
Yes, that is the point of it. I've added a comment above the test to say so.
Show 5 quoted lines
> This one I I am not sure what it is trying to test, though. Would > the test start failing as the machine is loaded more and 1000 ms > becomes insufficient? No. The thing is not locked, nobody takes a > lock competing with our test, so with any value of the timeout we > should succeed, no? Or would it fail if the timeout is set to 0ms?
You're right. Nothing holds the lock there, so it passes with any timeout and does not test lockTimeout at all. I've dropped it in v2.
I'll send v2 shortly.
Thanks, Okhuomon