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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 26, 2010, 19:32 UTC
Message-ID
<7veij6lvze.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7b9006620fab4214ee0db53ebc9e0caffc397959.1269506526.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> 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.

With your patch, local variant will become totally silent, but it may want to give some feedback like real transports do; it is not entirely clear what it should say, though. The progress report given by the real transports are to assure the user that we are not stuck, and the local one is usually reasonably fast.

It's pointless to say "initialized empty" and then say "I am working hard to clone". As the command always creates a new directory and clones into it, it makes sense to say only the latter, and your 1-byte patch may be a good first step in that direction.

An alternative might be to squelch init_db() like your patch did, and then replace it with a message of our own, perhaps like this:

 $ git clone -n /var/tmp/gomi victim-003
 Cloning into victim-003...
 done.
 $ git clone -n file:///var/tmp/gomi victim-004
 Cloning into victim-004...
 remote: Counting objects: ...
 Receiving objects: 100% (120/120), done.
Here I am assuming we would add "done." to the local codepath.

Personally I like the total silence your patch gives (i.e. no "Cloning into" line in either case, and no "done." in local case) slightly better; others may disagree and/or have better ideas.

> This is RFC/RFD. An actual patch will also adjust several tests to
> the new expected output.
And documentation, especially the tutorials.

"git init" as a top-level command may want to stay as-is; it is not like you run "init" over and over again. But we probably should make it an independent issue from the "clone" one.

Thanks.
Previous: Tilo SchwarzNext: Nicolas Pitre
Message 9 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.