All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] reflog: ignore expire-unreachable for "HEAD" reflog
Date: Thu, 15 Apr 2010 12:36:07 -0400	[thread overview]
Message-ID: <20100415163607.GA4279@coredump.intra.peff.net> (raw)
In-Reply-To: <4BC70D75.70801@viscovery.net>

On Thu, Apr 15, 2010 at 02:58:29PM +0200, Johannes Sixt wrote:

> Am 4/15/2010 14:30, schrieb Junio C Hamano:
> > A reflog consists of entries, each of which records how you got to the
> > current history by pointing to different commit objects.  Some entries
> > matter more than others do.  Dead-end experiments stop mattering faster
> > than others.  It is these _entries_ that we expire, because keeping them
> > indefinitely is a wasteful clutter.
> 
> I have no problem with this point of view, i.e., that expiration is merely
> about the entries, and that garbage-collecting objects is just a
> side-effect of removed entries.
> 
> But I don't see yet, why an entry pointing to a dead-end experiment is
> less important when it is an entry in a branch reflog than when it is an
> entry in the HEAD reflog. Care to explain?

I think it is because the reachability test is defined as "from the
current ref". So if I am doing a reachability test on next@{20}, I will
check whether it is in the current version of next. Unreachable things
are therefore dead-end experiments. But on HEAD, if I do:

  $ git checkout topic1
  $ git checkout topic2

Then the entry for HEAD@{1} will be unreachable from the current HEAD,
even though it is _not_ a failed experiment. It is just that we are no
longer pointing to that branch.

I think another way of addressing the same problem would be to redefine
"reachable" in this context as "reachable from any current ref".

-Peff

  reply	other threads:[~2010-04-15 16:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 20:34 [PATCH 1/2] Document gc.<pattern>.reflogexpire variables Junio C Hamano
2010-04-14 20:35 ` [PATCH 2/2] reflog: ignore expire-unreachable for "HEAD" reflog Junio C Hamano
2010-04-15  6:45   ` Johannes Sixt
2010-04-15  7:40     ` Junio C Hamano
2010-04-15  8:49       ` Johannes Sixt
2010-04-15 12:30         ` Junio C Hamano
2010-04-15 12:58           ` Johannes Sixt
2010-04-15 16:36             ` Jeff King [this message]
2010-04-15 16:57               ` Junio C Hamano
2010-04-15 19:48                 ` Nicolas Pitre
2010-04-15 22:42                   ` Junio C Hamano
2010-04-16  1:11                     ` Nicolas Pitre
2010-04-16  1:37                       ` Junio C Hamano
2010-04-16  3:07                         ` Nicolas Pitre
2010-04-16  6:08               ` Johannes Sixt
2010-04-15 16:49             ` 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=20100415163607.GA4279@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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.