From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git doesn't finds the parent of a commit
Date: Sun, 27 Apr 2008 23:46:21 +0200 [thread overview]
Message-ID: <20080427214621.GA30793@cuci.nl> (raw)
In-Reply-To: <7vtzhnf3w5.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
>"Stephen R. van den Berg" <srb@cuci.nl> writes:
>> I've had similar symptoms when I had circular references in the
>> repository. They're not reported by any of the existing checks, I've
>> submitted a patch (resent it just now) which causes git to check for
>> (and report) circular references when using --topo-order on e.g.
>> git-rev-list.
>Assuming that we never have SHA-1 hash collisions, the graft mechansim is
>practically the only way to get yourself into the circular reference
>situation.
True, I think.
>Perhaps we should check this circularity when we install grafts instead of
>special casing the topo-order codepath? How expensive would that
>alternative approach be?
Not practical in its current form.
Checking for circular references is O(n) in CPU and memory use relative
to the number of commits in the entire repository.
Consider:
- The proposed check in the topo-order path is very low-cost, it costs a
single decrement/increment per commit (and will detect other circular
references not caused by the grafts mechanism, if they ever should occur).
- If it is being done during the grafts install, then there should be a
flag-file (at least), which indicates when the grafts file has changed
since the last check.
- It could/should be added to git-fsck.
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.
next prev parent reply other threads:[~2008-04-27 21:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-12 12:07 How to fetch missing pack Jörg Sommer
2008-04-13 9:41 ` Peter Baumann
2008-04-23 20:55 ` Jörg Sommer
2008-04-24 6:01 ` Christian Couder
2008-04-24 6:08 ` Shawn O. Pearce
2008-04-27 10:47 ` git doesn't finds the parent of a commit (was: How to fetch missing pack) Jörg Sommer
2008-04-27 17:37 ` Stephen R. van den Berg
2008-04-27 20:18 ` git doesn't finds the parent of a commit Junio C Hamano
2008-04-27 21:46 ` Stephen R. van den Berg [this message]
2008-04-28 14:14 ` Jörg Sommer
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=20080427214621.GA30793@cuci.nl \
--to=srb@cuci.nl \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).