git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: A nice, beauty progress metter for Git Clone + a feature request
Date: Tue, 28 Mar 2023 13:51:39 -0400	[thread overview]
Message-ID: <20230328175139.GA18558@coredump.intra.peff.net> (raw)
In-Reply-To: <CAKc7PVDZ4Ra7s-pyFms1-sGqjYD9b407G1u0A0hHTkQRa-MPkQ@mail.gmail.com>

On Mon, Mar 27, 2023 at 10:59:56AM +0000, Sebastian Gniazdowski wrote:

> On Wed, 15 Mar 2023 at 18:02, Jeff King <peff@peff.net> wrote:
> > Now, none of that is _strictly_ necessary. We could just dump the same
> > human-readable progress to the progress command that we dump to stderr
> > now, and it could scrape it for things that look like progress, and pass
> > everything else through. But then, you can already do that with:
> >
> >   git clone --progress ... 2>&1 | my-progress-scraper
> >
> > (and it looks like the asciinema you showed is probably just a
> > syntactically nicer version of that with support from the shell?).
> 
> Yes, that's what the asciinema does  – it pipes git clone --progress
> to a script, and that's pretty much it. That's why I thought about a
> core.pipe option, that would hold the my-progress-scrapper command.
> That's a very easy change, could it be added to git source code?

For the reasons I gave earlier, it has to scrape all of stderr, and not
just progress output. I'm still skeptical that this buys a lot over just
redirecting stderr entirely via the shell, but it's at least
conceptually simple (it's basically the same as a pager for stderr).

The implementation might have some tricky bits to think about, though,
since we have an extra process to handle. For real pagers, we take some
care to terminate them on close. Maybe we wouldn't need the same here,
though (since the filter isn't interactive, and we don't want Git to
wait on exiting until it's done).

So I dunno. It might only be a few lines. It just feels like a weird
feature to add.

-Peff

  reply	other threads:[~2023-03-28 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKc7PVD_65vB5+meeO3xcu4ASbqr85LBGUO8Ntb7SvbO+NNHmQ@mail.gmail.com>
2023-03-10 11:37 ` A nice, beauty progress metter for Git Clone + a feature request Sebastian Gniazdowski
2023-03-15 18:02   ` Jeff King
2023-03-27 10:59     ` Sebastian Gniazdowski
2023-03-28 17:51       ` Jeff King [this message]
2023-03-28 20:49         ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230328175139.GA18558@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=sgniazdowski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).