From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/5] allow deepening of a shallow repository
Date: Fri, 17 Nov 2006 03:35:58 -0800 [thread overview]
Message-ID: <7vu00ymhk1.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0611171050440.13772@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Fri, 17 Nov 2006 10:52:54 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> Although I am reasonably sure we can eventually make it work, it
>> is very subtle and fragile -- somebody touching this code can
>> easily break it.
>
> I fully agree. Even the OA did not understand the code fully ;-)
>
> How about adding "int force_reparse" to the signature of
> unregister_shallow()? (Just like we added "int cleanup" to
> get_merge_bases() to avoid pilot errors.)
I do not think that's where its fragility lies. It is that any
random place can later call parse_object() on the commit, after
you elaborately pre-parsed it with shallow so that it appears to
have fewer parents, with the expectation that nobody ever would
clear the parsed bit and cause it to be reparsed again. With
that assumption, find_common() manipulated the shallow entry
after setting that scheme up. A mechanism to prevent the commit
from getting re-parsed would have made it more robust.
next prev parent reply other threads:[~2006-11-17 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 19:09 [PATCH 4/5] allow deepening of a shallow repository Johannes Schindelin
2006-11-14 7:24 ` Junio C Hamano
2006-11-14 11:03 ` Johannes Schindelin
2006-11-17 9:09 ` Junio C Hamano
2006-11-17 9:52 ` Johannes Schindelin
2006-11-17 11:35 ` Junio C Hamano [this message]
2006-11-18 12:58 ` Johannes Schindelin
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=7vu00ymhk1.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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