From: Michael J Gruber <git@drmicha.warpmail.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Nicolas Pitre <nico@fluxnic.net>,
git@vger.kernel.org, Alex Riesen <raa.lkml@gmail.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Neal Kreitzinger <neal@rsss.com>
Subject: Re: [PATCH RFC/RFD] clone: quell the progress report from init
Date: Tue, 30 Mar 2010 10:05:03 +0200 [thread overview]
Message-ID: <4BB1B0AF.7060206@drmicha.warpmail.net> (raw)
In-Reply-To: <7v7houxu8n.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 30.03.2010 07:18:
> Nicolas Pitre <nico@fluxnic.net> writes:
>
>> Personally I like your suggestion above. A clone is not something you
>> perform repeatedly, and it is the first thing that random people told to
>> use Git to grab a piece of code will do. Better give them some comfort
>> by telling them what is happening.
>
> Here is what such a change may look like. I'll leave adjusting
> documentation (namely, tutorials) and perhaps tests as an exercise to the
> readers ;-)
OK, I'll take it since I kicked this off.
> builtin/clone.c | 6 +++++-
> t/t5601-clone.sh | 2 +-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/builtin/clone.c b/builtin/clone.c
> index 05f8fb4..0bedde4 100644
> --- a/builtin/clone.c
> +++ b/builtin/clone.c
> @@ -302,6 +302,8 @@ static const struct ref *clone_local(const char *src_repo,
> transport = transport_get(remote, src_repo);
> ret = transport_get_remote_refs(transport);
> transport_disconnect(transport);
> + if (0 <= option_verbosity)
> + printf("done.\n");
> return ret;
> }
>
> @@ -461,7 +463,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
> die("could not create leading directories of '%s'", git_dir);
> set_git_dir(make_absolute_path(git_dir));
>
> - init_db(option_template, (option_verbosity < 0) ? INIT_DB_QUIET : 0);
> + if (0 <= option_verbosity)
> + printf("Cloning into %s...\n", get_git_dir());
> + init_db(option_template, INIT_DB_QUIET);
Don't we want init to report at least with -v?
>
> /*
> * At this point, the config exists, so we do not need the
> diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
> index 2147567..678cee5 100755
> --- a/t/t5601-clone.sh
> +++ b/t/t5601-clone.sh
> @@ -34,7 +34,7 @@ test_expect_success 'clone with excess parameters (2)' '
> test_expect_success 'output from clone' '
> rm -fr dst &&
> git clone -n "file://$(pwd)/src" dst >output &&
> - test $(grep Initialized output | wc -l) = 1
> + test $(grep Clon output | wc -l) = 1
> '
>
> test_expect_success 'clone does not keep pack' '
Michael
next prev parent reply other threads:[~2010-03-30 8:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 22:44 color (red) for error messages on all git commands Neal Kreitzinger
2010-03-24 22:58 ` Sverre Rabbelier
2010-03-24 23:12 ` Alex Riesen
2010-03-25 8:43 ` Michael J Gruber
2010-03-25 8:46 ` [PATCH RFC/RFD] clone: quell the progress report from init Michael J Gruber
2010-03-25 9:02 ` Alex Riesen
2010-03-25 9:26 ` Michael J Gruber
2010-03-25 16:31 ` Tilo Schwarz
2010-03-26 19:32 ` Junio C Hamano
2010-03-26 20:16 ` Nicolas Pitre
2010-03-26 20:24 ` Junio C Hamano
2010-03-30 5:18 ` Junio C Hamano
2010-03-30 8:05 ` Michael J Gruber [this message]
2010-03-30 8:43 ` Alex Riesen
2010-04-01 22:03 ` [PATCH] clone: quell the progress report from init and report on clone Michael J Gruber
2010-04-02 7:28 ` Junio C Hamano
2010-04-04 13:02 ` Michael J Gruber
2010-04-23 12:37 ` Michael J Gruber
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=4BB1B0AF.7060206@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=neal@rsss.com \
--cc=nico@fluxnic.net \
--cc=raa.lkml@gmail.com \
--cc=srabbelier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.