All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Junio C Hamano <gitster@pobox.com>,
	Stefan Beller <sbeller@google.com>, Jeff King <peff@peff.net>,
	git@vger.kernel.org
Subject: Re: [PATCH 2/2] lock_packed_refs(): allow retries when acquiring the packed-refs lock
Date: Sat, 02 May 2015 23:43:33 +0200	[thread overview]
Message-ID: <55454505.9060305@kdbg.org> (raw)
In-Reply-To: <554448B6.6080605@alum.mit.edu>

Am 02.05.2015 um 05:47 schrieb Michael Haggerty:
> On 05/01/2015 06:13 PM, Johannes Sixt wrote:
>> How about this:
>>
>>      test_when_finished "wait; rm -f $LOCK" &&
>>      { sleep 1 & } &&
>>      ...
>
> Thanks for pointing out this problem. Your suggestion seems good. I
> assume that you didn't intend to omit the "rm -f $LOCK" from the
> subprocess, because the whole point is for that to happen while "git
> pack-refs" is running.

I see. So, if git pack-refs works correctly, it waits for the 
sub-process, and the 'wait' in test_when_finished does not buy a lot. If 
there is breakage, the trash directory is not attempted to be removed, 
and it does not matter that a process potentially occupies it. I think 
your version is good then.

-- Hannes

  reply	other threads:[~2015-05-02 21:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 14:52 [PATCH 0/2] Retry attempts to acquire the packed-refs lock Michael Haggerty
2015-05-01 14:52 ` [PATCH 1/2] lockfile: allow file locking to be retried with a timeout Michael Haggerty
2015-05-11 18:04   ` Junio C Hamano
2015-05-01 14:52 ` [PATCH 2/2] lock_packed_refs(): allow retries when acquiring the packed-refs lock Michael Haggerty
2015-05-01 16:13   ` Johannes Sixt
2015-05-02  3:47     ` Michael Haggerty
2015-05-02 21:43       ` Johannes Sixt [this message]
2015-05-11  9:31         ` Michael Haggerty
2015-05-01 17:51   ` Stefan Beller
2015-05-01 18:22     ` Jeff King
2015-05-02  5:19       ` Michael Haggerty
2015-05-04 17:31         ` Stefan Beller
2015-05-05 19:21         ` Jeff King
2015-05-11 10:26           ` Michael Haggerty
2015-05-11 16:49             ` Jeff King
2015-05-11 17:49               ` Stefan Beller
2015-05-11 17:50                 ` Stefan Beller
2015-05-03  2:12 ` [PATCH 0/2] Retry attempts to acquire " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55454505.9060305@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.