From: Junio C Hamano <gitster@pobox.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Stefan Beller <stefanbeller@googlemail.com>,
Jonathan Nieder <jrnieder@gmail.com>,
schlotter@users.sourceforge.net, Ralf.Wildenhues@gmx.de,
git@vger.kernel.org
Subject: Re: On --depth=funny value
Date: Tue, 08 Jan 2013 21:19:05 -0800 [thread overview]
Message-ID: <7vr4lv7x2u.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CACsJy8CA-a0=HqTY9heJBhPO4M5jyLk=tf253rRKCRuTWz5teg@mail.gmail.com> (Duy Nguyen's message of "Wed, 9 Jan 2013 11:18:30 +0700")
Duy Nguyen <pclouds@gmail.com> writes:
> On Wed, Jan 9, 2013 at 9:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
> ...
>> * We would like to update "clone --depth=1" to end up with a tip
>> only repository, but let's not to touch "git fetch" (and "git
>> clone") and make them send 0 over the wire when the command line
>> tells them to use "--depth=1" (i.e. let's not do the "off-by-one"
>> thing).
>
> You can't anyway. Depth 0 on the wire is considered invalid by upload-pack.
Yes, that is a good point that we say "if (0 < opt->depth) do the
shallow thing" everywhere, so 0 is spcial in that sense.
Which suggests that if we wanted to, we could update the fetch side
to do the off-by-one thing against the current upload-pack when the
given depth is two or more, and still send 1 when depth=1. When
talking with an updated upload-pack that advertises exact-shallow
protocol extension, it can disable that off-by-one for all values of
depth. That way, the updated client gets history of wrong depth
only for --depth=1 when talking with the current upload-pack; all
other cases, it will get history of correct depth.
Hmm?
next prev parent reply other threads:[~2013-01-09 5:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 8:07 [PATCH] add warning for depth=0 in git clone Stefan Beller
2013-01-08 8:09 ` Stefan Beller
2013-01-08 8:14 ` Jonathan Nieder
2013-01-08 8:12 ` Jonathan Nieder
2013-01-09 0:57 ` Duy Nguyen
2013-01-09 2:53 ` On --depth=funny value Junio C Hamano
2013-01-09 4:18 ` Duy Nguyen
2013-01-09 5:19 ` Junio C Hamano [this message]
2013-01-09 14:12 ` Duy Nguyen
2013-01-09 14:59 ` Duy Nguyen
2013-01-09 21:38 ` Stefan Beller
2013-01-11 3:30 ` [PATCH 1/2] fetch, upload-pack: add --no-shallow for infinite depth Nguyễn Thái Ngọc Duy
2013-01-11 3:30 ` [PATCH 2/2] upload-pack: fix off-by-one depth calculation in shallow clone Nguyễn Thái Ngọc Duy
2013-01-11 4:26 ` Junio C Hamano
2013-01-11 3:55 ` [PATCH 1/2] fetch, upload-pack: add --no-shallow for infinite depth Junio C Hamano
2013-01-11 9:05 ` [PATCH v2 1/3] fetch: add --unshallow for turning shallow repo into complete one Nguyễn Thái Ngọc Duy
2013-01-11 9:05 ` [PATCH v2 2/3] upload-pack: fix off-by-one depth calculation in shallow clone Nguyễn Thái Ngọc Duy
2013-01-11 9:05 ` [PATCH v2 3/3] fetch: elaborate --depth action Nguyễn Thái Ngọc Duy
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=7vr4lv7x2u.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Ralf.Wildenhues@gmx.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pclouds@gmail.com \
--cc=schlotter@users.sourceforge.net \
--cc=stefanbeller@googlemail.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).