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

Re: [PATCH] Fix argument handling for fetch-pack call when stdout is connected and -q/--quiet is supplied.

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 3, 2008, 19:50 UTC
Message-ID
<alpine.LNX.1.00.0810031548260.19665@iabervon.org>
In-Reply-To
<4ac8254d0810031234x26ebc96cy7cf5dcae2ef516e0@mail.gmail.com>
On Fri, 3 Oct 2008, Tuncer Ayaz wrote:
Show 31 quoted lines
> Following is a patch to complete the changes discussed
> here http://marc.info/?l=git&m=121529226023180&w=2.
> 
> I hope it makes sense and doesn't break something else.
> 
> With this simple one-liner patch applied I no longer see
> the following remote messages as no-progress is correctly
> sent to the remote site:
> remote: Counting objects: 84102, done.
> remote: Compressing objects: 100% (24720/24720), done.
> remote: Total 84102 (delta 60949), reused 80810 (delta 57900)
> 
> Regards,
> 
>         Tuncer Ayaz
> 
> Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>
> ---
>  transport.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/transport.c b/transport.c
> index 71433d9..1f24011 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -644,7 +644,7 @@ static int fetch_refs_via_pack(struct transport *transport,
>     args.include_tag = data->followtags;
>     args.verbose = (transport->verbose > 0);
>     args.quiet = args.no_progress = (transport->verbose < 0);
> -   args.no_progress = !isatty(1);
> +   args.no_progress = args.quiet || !isatty(1);

If you're doing that, remove the "args.no_progress =" from the previous line, which was there to have that effect (but not so clearly). Aside from that, it looks good to me.

Show 6 quoted lines
>     args.depth = data->depth;
> 
>     for (i = 0; i < nr_heads; i++)
> -- 
> 1.6.0.2
> 
Previous: Tuncer AyazNext: Tuncer Ayaz
Message 2 of 6 in “Fix argument handling for fetch-pack call when stdout is connected and -q/--quiet is supplied.”
  1. Fix argument handling for fetch-pack call when stdout is connected and -q/--quiet is supplied.Tuncer Ayaz, Oct 3, 2008
  2. Daniel BarkalowOct 3, 2008
  3. Tuncer AyazOct 3, 2008
  4. Constantine PlotnikovOct 3, 2008
  5. Daniel BarkalowOct 3, 2008
  6. Tuncer AyazOct 3, 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.