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

Re: Push not writing to standard error

From
Chase Brammer <cbrammer@gmail.com>
Date
Oct 12, 2010, 20:37 UTC
Message-ID
<AANLkTim_pjJ76J0ctSQO=eYsVtkZAgq2nhm0fskjjo+g@mail.gmail.com>
In-Reply-To
<20101012193830.GB8620@sigill.intra.peff.net>

Wow, I am amazed at how quick you churned that out. I haven't participated in the git patch and release cycle, so forgive my ignorance. Do you think that this will be released in the next release (1.7.3.2) ? If so, any expectations on release date?

Chase
On Tue, Oct 12, 2010 at 1:38 PM, Jeff King <peff@peff.net> wrote:
Show 67 quoted lines
>
> On Tue, Oct 12, 2010 at 03:32:04PM -0400, Jeff King wrote:
>
> > It looks like transport_set_verbosity gets called correctly, and then
> > sets the "progress" flag for the transport. But for the push side, I
> > don't see any transports actually looking at that flag. I think there
> > needs to be code in git_transport_push to handle the progress flag, and
> > it just isn't there.
>
> Here's a quick 5-minute patch. It works on my test case:
>
>  rm -rf parent child
>  git init parent &&
>  git clone parent child &&
>  cd child &&
>  echo content >file && git add file && git commit -m one &&
>  git push --progress origin master:foo >foo.out 2>&1 &&
>  cat foo.out
>
> but I didn't even run the test suite. Maybe somebody more clueful in the
> area can pick it up?
>
> diff --git a/builtin/send-pack.c b/builtin/send-pack.c
> index 481602d..efd9be6 100644
> --- a/builtin/send-pack.c
> +++ b/builtin/send-pack.c
> @@ -48,6 +48,7 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
>                NULL,
>                NULL,
>                NULL,
> +               NULL,
>        };
>        struct child_process po;
>        int i;
> @@ -59,6 +60,8 @@ static int pack_objects(int fd, struct ref *refs, struct extra_have_objects *ext
>                argv[i++] = "--delta-base-offset";
>        if (args->quiet)
>                argv[i++] = "-q";
> +       if (args->progress)
> +               argv[i++] = "--progress";
>        memset(&po, 0, sizeof(po));
>        po.argv = argv;
>        po.in = -1;
> diff --git a/send-pack.h b/send-pack.h
> index 60b4ba6..fcf4707 100644
> --- a/send-pack.h
> +++ b/send-pack.h
> @@ -4,6 +4,7 @@
>  struct send_pack_args {
>        unsigned verbose:1,
>                quiet:1,
> +               progress:1,
>                porcelain:1,
>                send_mirror:1,
>                force_update:1,
> diff --git a/transport.c b/transport.c
> index 4dba6f8..0078660 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -789,6 +789,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
>        args.use_thin_pack = data->options.thin;
>        args.verbose = (transport->verbose > 0);
>        args.quiet = (transport->verbose < 0);
> +       args.progress = transport->progress;
>        args.dry_run = !!(flags & TRANSPORT_PUSH_DRY_RUN);
>        args.porcelain = !!(flags & TRANSPORT_PUSH_PORCELAIN);
>
Previous: Jeff KingNext: Jeff King
Message 5 of 10 in “Push not writing to standard error”
  1. Chase BrammerOct 12, 2010
  2. Jonathan NiederOct 12, 2010
  3. Jeff KingOct 12, 2010
  4. Jeff KingOct 12, 2010
  5. Chase BrammerOct 12, 2010
  6. Jeff KingOct 12, 2010
  7. Chase BrammerOct 12, 2010
  8. Junio C HamanoOct 13, 2010
  9. Jeff KingOct 13, 2010
  10. Scott R. GodinOct 18, 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.