git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH RFC/RFD] clone: quell the progress report from init

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Mar 25, 2010, 08:46 UTC
Message-ID
<7b9006620fab4214ee0db53ebc9e0caffc397959.1269506526.git.git@drmicha.warpmail.net>
In-Reply-To
<4BAB2234.4070202@drmicha.warpmail.net>

Currently, cloning a local repository results in the progress report "Initialized empty Git repository in ..." from init but no other output, leaving the user to wonder what happened to the actual cloning.

Therefore, quell the progress report from init (unless -v is given) to be in line with the many other commands which report nothing on success.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
This is RFC/RFD. An actual patch will also adjust several tests to
the new expected output. Also, one might want to change init's default
verbosity level accordingly.
The current output is really confusing for local cloning. There are
several alternative ways to resolve this:
- Make the local cloning process report something.
- Check whether the clone is remote or not and report init or don't.
Currently, we really have two philosophies:
- report only on error
- be chatty on success

I don't think that's a problem, but "simple" commands (e.g. branch, init, add) should be in the former camp.

 builtin/clone.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 05f8fb4..f98c5c5 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -461,7 +461,7 @@ 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);
+	init_db(option_template, (option_verbosity <= 0) ? INIT_DB_QUIET : 0);
 
 	/*
 	 * At this point, the config exists, so we do not need the
-- 
1.7.0.3.448.g82eeb
Previous: Michael J GruberNext: Alex Riesen
Message 5 of 18 in “color (red) for error messages on all git commands”
  1. Neal KreitzingerMar 24, 2010
  2. Sverre RabbelierMar 24, 2010
  3. Alex RiesenMar 24, 2010
  4. Michael J GruberMar 25, 2010
  5. clone: quell the progress report from initMichael J Gruber, Mar 25, 2010
  6. Alex RiesenMar 25, 2010
  7. Michael J GruberMar 25, 2010
  8. Tilo SchwarzMar 25, 2010
  9. Junio C HamanoMar 26, 2010
  10. Nicolas PitreMar 26, 2010
  11. Junio C HamanoMar 26, 2010
  12. Junio C HamanoMar 30, 2010
  13. Michael J GruberMar 30, 2010
  14. Alex RiesenMar 30, 2010
  15. clone: quell the progress report from init and report on cloneMichael J Gruber, Apr 1, 2010
  16. Junio C HamanoApr 2, 2010
  17. Michael J GruberApr 4, 2010
  18. clone: quell the progress report from init and report on cloneMichael J Gruber, Apr 23, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.