From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: Jakub Narebski <jnareb@gmail.com>,
mikachu@gmail.com, computerdruid@gmail.com,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org
Subject: Re: [PATCH 3/3] {fetch,upload}-pack: allow --depth=0 for infinite depth
Date: Fri, 20 Aug 2010 17:27:27 -0700 [thread overview]
Message-ID: <7vr5hs95e8.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 1282269067-5527-3-git-send-email-pclouds@gmail.com
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
> index 9333c42..a22d839 100644
> --- a/Documentation/fetch-options.txt
> +++ b/Documentation/fetch-options.txt
> @@ -10,7 +10,8 @@
> --depth=<depth>::
> Deepen the history of a 'shallow' repository created by
> `git clone` with `--depth=<depth>` option (see linkgit:git-clone[1])
> - by the specified number of commits.
> + by the specified number of commits. Specify "inf" for
> + infinite depth.
>
> ifndef::git-pull[]
> --dry-run::
> diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
> index 4a8487c..75e4669 100644
> --- a/Documentation/git-fetch-pack.txt
> +++ b/Documentation/git-fetch-pack.txt
> @@ -70,6 +70,7 @@ OPTIONS
>
> --depth=<n>::
> Limit fetching to ancestor-chains not longer than n.
> + Specify 0 for infinite depth.
>
Should we force users to remember which one is which?
> diff --git a/transport.c b/transport.c
> index cf7030b..9303aef 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -475,7 +475,7 @@ static int set_git_option(struct git_transport_options *opts,
> opts->shallow = 0;
> }
> else {
> - opts->depth = atoi(value);
> + opts->depth = !strcmp(value, "inf") ? 0 : atoi(value);
Doesn't atoi("inf") give you 0 anyway ;-)?
next prev parent reply other threads:[~2010-08-21 0:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 1:51 [PATCH 1/3] clone: do not accept --depth on local clones Nguyễn Thái Ngọc Duy
2010-08-20 1:51 ` [PATCH 2/3] fetch-pack: use args.shallow to detect shallow clone instead of args.depth Nguyễn Thái Ngọc Duy
2010-08-20 1:51 ` [PATCH 3/3] {fetch,upload}-pack: allow --depth=0 for infinite depth Nguyễn Thái Ngọc Duy
2010-08-20 22:11 ` Jakub Narebski
2010-08-22 22:51 ` Nguyen Thai Ngoc Duy
2010-08-21 0:27 ` Junio C Hamano [this message]
2010-08-21 0:27 ` [PATCH 1/3] clone: do not accept --depth on local clones Junio C Hamano
2010-08-22 22:43 ` Nguyen Thai Ngoc 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=7vr5hs95e8.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=computerdruid@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=mikachu@gmail.com \
--cc=pclouds@gmail.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).