From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Michal Hocko <mhocko@suse.cz>, git@vger.kernel.org
Subject: Re: git describe --contains doesn't work properly for a commit
Date: Wed, 4 Mar 2015 13:05:29 -0500 [thread overview]
Message-ID: <20150304180529.GA28074@peff.net> (raw)
In-Reply-To: <54F71F69.3080500@drmicha.warpmail.net>
On Wed, Mar 04, 2015 at 04:06:17PM +0100, Michael J Gruber wrote:
> > 3. Introduce a more trust-worthy mechanism for ordering commits. The
> > timestamp here is really just a proxy for the oft-discussed
> > "generation number" of the commit within the graph. We've avoided
> > adding generation numbers because of the storage/complexity issues.
>
> Hmmh.
>
> Storage: one int (or maybe less) per commit doesn't sound too bad. We
> can probably do without on bare repos by default.
>
> Complexity: Was that due to replace refs? Other than that, it seemed to
> be simple: max(parent generation numbers)+1.
Calculating them is simple. Caching and storage is the bigger question.
When we do we generate them? Where do we store them? What do we do with
replace-refs and grafts?
I think the answers are "at repack time", "in an auxiliary file alongside
the pack idx", and "we turn it off completely when these features are in
use".
See:
http://thread.gmane.org/gmane.comp.version-control.git/214916
for a sample implementation.
> ... or can reachability bitmaps help???
Sometimes. If you are asking about --contains traversals, then bitmaps
can let you stop the traversal early. We have some patches that do this
that are running in production at GitHub, but they are kind of gnarly.
One of my goals is to clean them up and get them upstream.
It's also part of why I didn't pursue the series above further. Making
"--contains" faster is one goal, but making "rev-list --objects --all"
faster was more important (since we do it for every fetch). And making
commits faster is only half the equation there.
-Peff
next prev parent reply other threads:[~2015-03-04 18:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 13:35 git describe --contains doesn't work properly for a commit Michal Hocko
2015-02-26 14:23 ` Michal Hocko
2015-03-04 10:54 ` Jeff King
2015-03-04 15:06 ` Michael J Gruber
2015-03-04 18:05 ` Jeff King [this message]
2015-03-04 20:41 ` Junio C Hamano
2015-03-04 22:05 ` Mike Hommey
2015-03-05 5:12 ` Jeff King
2015-03-05 6:00 ` 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=20150304180529.GA28074@peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=mhocko@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox