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

Re: git-clone --quiet broken?

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jul 6, 2008, 01:22 UTC
Message-ID
<alpine.LNX.1.00.0807052102180.19665@iabervon.org>
In-Reply-To
<7vmykvrfta.fsf@gitster.siamese.dyndns.org>
On Sat, 5 Jul 2008, Junio C Hamano wrote:
Show 15 quoted lines
> Dave Jones <davej@codemonkey.org.uk> writes:
> 
> > The server I run various git snapshots on recently got upgraded to git 1.5.6,
> > ...
> > I could run the clone with 2>/dev/null, but I'd really like to get
> > mail when something breaks instead of it being totally silent.
> >
> > I'm assuming this was an unintentional side-effect of some other recent change?
> 
> Yeah, I would assume so, too ;-)
> 
> Daniel, is this enough?  From re-reading the scripted version of
> git-clone, it appears that we *might* need to squelch no-progress if the
> stdout is not tty;  I do not offhand if you got that right when you
> rewrote this in C.

This is probably enough for what people actually care about (when stdout isn't a tty and isn't /dev/null, people are likely to ask for "quiet" anyway, because this command's output isn't interesting after the fact). But no-progress is probably a good idea anyway.

Oh, and you're fixing the corresponding regressions in fetch, which nobody seems to have mentioned previously.

Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Show 14 quoted lines
>  transport.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/transport.c b/transport.c
> index 3ff8519..b2f0d8a 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -645,7 +645,8 @@ static int fetch_refs_via_pack(struct transport *transport,
>  	args.lock_pack = 1;
>  	args.use_thin_pack = data->thin;
>  	args.include_tag = data->followtags;
> -	args.verbose = transport->verbose > 0;
> +	args.verbose = (transport->verbose > 0);
> +	args.quiet = (transport->verbose < 0);

And: + args.no_progress = !isatty(1);

>  	args.depth = data->depth;
>  
>  	for (i = 0; i < nr_heads; i++)
Previous: Junio C HamanoNext: Alex Riesen
Message 3 of 5 in “git-clone --quiet broken?”
  1. Dave JonesJul 5, 2008
  2. Junio C HamanoJul 6, 2008
  3. Daniel BarkalowJul 6, 2008
  4. Alex RiesenJul 6, 2008
  5. Daniel BarkalowJul 7, 2008

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.