public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: "Jens Lindström" <jl@opera•com>
Cc: Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH 1/2] remote: defer repacking packed-refs when deleting refs
Date: Tue, 27 May 2014 09:55:02 -0700	[thread overview]
Message-ID: <xmqqha4bgo0p.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAEef6Wxg2QkWDzjuogh5sjjE=HZ9NRUmiY9AhExSXK7H3pAcNA@mail.gmail.com> ("Jens Lindström"'s message of "Sat, 24 May 2014 09:54:17 +0200")

Jens Lindström <jl@opera•com> writes:

>> Puzzled....
>
> There is one reason why one would want to call delete_ref() even if
> the ref itself was already fully deleted by repack_without_refs()
> (because it was only packed) and that is that delete_ref() also
> removes the ref log, if there is one.

Ahh, ok, no longer puzzled---I completely forgot about that part.

> We could refactor the deletion to
>
>   1) repack_without_refs() on all refs
>   2) delete_ref() on still existing (loose) refs
>   3) delete_ref_log() on all refs
>
> to let us only call delete_ref() on existing refs, and then keep the
> current value check.

I tend to agree that it is sufficient for the purpose of this topic
to be loose about the check; the refactoring can come later, as part
of the ref-transaction refactoring that is going on in a separate
thread.

  reply	other threads:[~2014-05-27 16:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20 10:34 [PATCH 0/2] remote: optimize rm/prune ref deletion Jens Lindström
2014-05-20 10:39 ` [PATCH 1/2] remote: defer repacking packed-refs when deleting refs Jens Lindström
2014-05-20 19:30   ` Junio C Hamano
2014-05-20 20:29     ` Junio C Hamano
2014-05-23 10:03       ` Jens Lindström
2014-05-23 17:09         ` Junio C Hamano
2014-05-24  7:54           ` Jens Lindström
2014-05-27 16:55             ` Junio C Hamano [this message]
2014-05-20 10:41 ` [PATCH 2/2] remote prune: optimize "dangling symref" check/warning Jens Lindström
2014-05-23 10:26 ` [PATCH v2 0/3] remote: optimize rm/prune ref deletion Jens Lindström
2014-05-23 10:28   ` [PATCH v2 1/3] remote rm: delete remote configuration as the last Jens Lindström
2014-05-23 18:55     ` Junio C Hamano
2014-05-23 10:29   ` [PATCH v2 2/3] remote: repack packed-refs once when deleting multiple refs Jens Lindström
2014-05-23 19:11     ` Junio C Hamano
2014-05-23 19:25       ` Junio C Hamano
2014-05-23 10:30   ` [PATCH v2 3/3] remote prune: optimize "dangling symref" check/warning Jens Lindström

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=xmqqha4bgo0p.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jl@opera$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox