From: "Jakub Narębski" <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
Marc Strapetz <marc.strapetz@syntevo.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: topological index field for commit objects
Date: Wed, 29 Jun 2016 23:00:13 +0200 [thread overview]
Message-ID: <577436DD.8050708@gmail.com> (raw)
In-Reply-To: <CAPc5daVC-+0Vr30L_pbcL0GN2OmnGm-+V4tE2WTos_vPRb_S1g@mail.gmail.com>
W dniu 2016-06-29 o 20:59, Junio C Hamano pisze:
> On Wed, Jun 29, 2016 at 11:31 AM, Marc Strapetz
> <marc.strapetz@syntevo.com> wrote:
>
>> This is no RFE but rather recurring thoughts whenever I'm working with
>> commit graphs: a topological index attribute for commit objects would be
>> incredible useful. By "topological index" I mean a simple integer for which
>> following condition holds true:
>>
>> if commit C is part of the history of commit D,
>> then C's topological index is smaller than D's index
>>
>> This would allow topological sorting of commits (e.g. in queues) on the fly
>> and quickly give a "no" answer on the question whether D is part of
>> C's history.
>
> Look for "generation numbers" in the list archive, perhaps?
If I remember correctly the discussion, the problem by adding generation number
to the commit object format was twofold (at least).
First there was a problem of backward compatibility, namely what to do with
existing repositories, where commit objects do not have generation number.
Objects in Git are immutable (and I think replacements mechanism wasn't
invented yet - anyway too many replacements would slow down operations
I guess).
Second objection was of philosophical nature: generation numbers duplicate
(cache) information that is stored in the graph of revisions. Also, what
if they get out of sync?
That is, if I remember the summary of that discussion correctly.
Also, generation numbers (graph level) only help with topological sorting;
for finding of two commits are connected (two nodes are connected) people
play with different ideas, for example FELINE index:
http://openproceedings.org/EDBT/2014/paper_166.pdf
Nowadays there is also [compressed] bitmap index (if enabled), though I am
not sure if it is yet used to speed-up reachability queries
http://githubengineering.com/counting-objects/
https://www.eclipsecon.org/2013/sites/eclipsecon.org.2013/files/Scaling%20Up%20JGit%20-%20EclipseCon%202013.pdf
--
Jakub Narębski
prev parent reply other threads:[~2016-06-29 21:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 18:31 topological index field for commit objects Marc Strapetz
2016-06-29 18:59 ` Junio C Hamano
2016-06-29 20:20 ` Stefan Beller
2016-06-29 20:39 ` Junio C Hamano
2016-06-29 20:54 ` Stefan Beller
2016-06-29 21:37 ` Stefan Beller
2016-06-29 21:43 ` Jeff King
2016-06-29 20:56 ` Jeff King
2016-06-29 21:49 ` Jakub Narębski
2016-06-29 22:00 ` Jeff King
2016-06-29 22:11 ` Junio C Hamano
2016-06-29 22:30 ` Jeff King
2016-07-05 11:43 ` Johannes Schindelin
2016-07-05 12:59 ` Jakub Narębski
2016-06-30 10:30 ` Jakub Narębski
2016-06-30 18:12 ` Linus Torvalds
2016-06-30 23:39 ` Jakub Narębski
2016-06-30 23:59 ` Mike Hommey
2016-07-01 3:17 ` Jeff King
2016-07-01 6:45 ` Marc Strapetz
2016-07-01 9:48 ` Jakub Narębski
2016-07-01 16:08 ` Junio C Hamano
2016-07-01 6:54 ` Jeff King
2016-07-01 9:59 ` Jakub Narębski
2016-07-20 0:07 ` Jakub Narębski
2016-07-20 13:02 ` Jeff King
2017-02-04 13:43 ` Jakub Narębski
2017-02-17 9:26 ` Jeff King
2017-02-17 9:28 ` Jakub Narębski
2016-06-29 22:15 ` Marc Strapetz
2016-06-29 21:00 ` Jakub Narębski [this message]
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=577436DD.8050708@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marc.strapetz@syntevo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).