From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/5] allow cloning a repository "shallowly"
Date: Tue, 14 Nov 2006 09:46:57 -0800 [thread overview]
Message-ID: <7vpsbpzzse.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0611141145390.13772@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Tue, 14 Nov 2006 11:49:55 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> I understand "no need making it shallow", but I am not sure if a
>> non-NULL return from lookup_object() tells us that.
>
> You are probably right, how about has_sha1_file()?
>
>> I think register_shallow() can take commits that are already shallow()
>> so maybe we can remove this "if() continue"?
>
> Yes, it can, but that is not necessarily correct: since .git/shallow is
> constructed from the registered shallow commits, we would make a commit
> shallow which is really not shallow.
>
> So, how about
>
>> > + if (lookup_object(sha1) || has_sha1_file(sha1))
>> > + continue;
If I understand the code correctly, this loop is reading what
the other side thinks your shallows should be (based on your
earlier "deepen" request or if this is initial fetch based on
your depth). Even if we already have that object, if that
object _is_ shallow on our end, don't we need to keep it marked
as shallow? Will we get ancestors of this commit from the other
end (and "shallow" lines for some of them to properly cauterize
the chain)?
next prev parent reply other threads:[~2006-11-14 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 19:09 [PATCH 3/5] allow cloning a repository "shallowly" Johannes Schindelin
2006-11-14 7:24 ` Junio C Hamano
2006-11-14 10:49 ` Johannes Schindelin
2006-11-14 17:46 ` Junio C Hamano [this message]
2006-11-15 10:57 ` 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=7vpsbpzzse.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