Re: [PATCH] add warning for depth=0 in git clone.
Hi, I am struggling a little with the development process, is a sign-off strictly required for git as it is for kernel development? If so here would be my sign-off: Signed-off-by: Stefan Beller stefanbel...@googlemail.com This adds a warning and the previous patch adds the documentation. However I agree to Junio, that the meaning should actually depth=0 - just the tip and no (0) other commits before. depth=n - the tip and n other commits before. On 01/08/2013 09:07 AM, Stefan Beller wrote: --- builtin/clone.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/clone.c b/builtin/clone.c index ec2f75b..5e91c1e 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -818,6 +818,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) remote = remote_get(option_origin); transport = transport_get(remote, remote-url[0]); + if (option_depth transport-smart_options-depth 1) + die(_(--depth less or equal 0 makes no sense; read manpage.)); + if (!is_local) { if (!transport-get_refs_list || !transport-fetch) die(_(Don't know how to clone %s), transport-url); -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] add warning for depth=0 in git clone.
Stefan Beller wrote: I am struggling a little with the development process, is a sign-off strictly required for git as it is for kernel development? Yes. Documentation/SubmittingPatches has more hints. Signed-off-by: Stefan Beller stefanbel...@googlemail.com This adds a warning and the previous patch adds the documentation. Thanks for your work on this. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] add warning for depth=0 in git clone.
On Tue, Jan 8, 2013 at 3:07 PM, Stefan Beller stefanbel...@googlemail.com wrote: --- builtin/clone.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/clone.c b/builtin/clone.c index ec2f75b..5e91c1e 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -818,6 +818,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) remote = remote_get(option_origin); transport = transport_get(remote, remote-url[0]); + if (option_depth transport-smart_options-depth 1) + die(_(--depth less or equal 0 makes no sense; read manpage.)); + Isn't this too early for the check? The following code is if (!is_local) { if (!transport-get_refs_list || !transport-fetch) die(_(Don't know how to clone %s), transport-url); transport_set_option(transport, TRANS_OPT_KEEP, yes); if (option_depth) transport_set_option(transport, TRANS_OPT_DEPTH, option_depth); where transport_set_option() calls set_git_option() to initialize transport-smart_options-depth. A check should be done after this point. -- Duy -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html