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

Re: Very simple popen() code request, ground-shaking functionality openned by it

From
Jeff King <peff@peff.net>
Date
Sep 21, 2018, 22:24 UTC
Message-ID
<20180921222454.GD11177@sigill.intra.peff.net>
In-Reply-To
<315083291.15466.1537536854535@privateemail.com>
On Fri, Sep 21, 2018 at 09:34:14AM -0400, Sebastian Gniazdowski wrote:
Show 16 quoted lines
> Git default progress indicator for clone is very unattractive, IMO. It
> does its job in providing all the operation details very well, but I
> bet most of users strongly dream about a gauge box!
> 
> Have a look at my gauge box constructed as git-stderr pipe script:
> https://asciinema.org/a/202401
> 
> The main point of my feature request is: git can add
> core.progress_pipe option, where e.g. `/usr/local/bin/mygauge' will be
> set (a script like the one in the asciinema), and then simply do the
> ground-school-known `popen("/usr/local/bin/mygauge","r+")', and write
> **unchanged current-progress data** to the pipe, then read from the
> pipe and forward to `stderr', where the progress normally lands in.
> 
> This will allow users to free their creativity and provide probably
> dozens of custom Git progress bars.

I don't personally feel that the existing progress bar is that bad, but if anybody wants to pursue this, I think the most sensible path is:

  1. Add a trace_key for sending machine-readable progress output to a
     descriptor or file. E.g., via setting GIT_TRACE_PROGRESS=2 in the
     environment.
  2. Teach the trace code to open a command for piping, so that you
     could do something like GIT_TRACE_PROGRESS='|mygauge'.

That would make your use case work, and I think many other use cases would benefit from both of those features independently.

-Peff
Previous: Sebastian GniazdowskiNext: Ævar Arnfjörð Bjarmason
Message 2 of 6 in “Very simple popen() code request, ground-shaking functionality openned by it”
  1. Sebastian GniazdowskiSep 21, 2018
  2. Jeff KingSep 21, 2018
  3. Ævar Arnfjörð BjarmasonSep 21, 2018
  4. Jeff KingSep 21, 2018
  5. Sebastian GniazdowskiSep 22, 2018
  6. Duy NguyenSep 23, 2018

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.