Re: [PATCH v2 1/1] commit-graph: use start_delayed_progress()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 07, 2019 at 01:37:52PM +0900, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > I think this is OK for now, though it does make me wonder if
> > "--progress" ought to perhaps override "delayed" in some instances,
> > since it's a positive signal from the caller that they're interested in
> > seeing progress.
> 
> I did have the same reaction after seeing the change to 5318 where
> the expected output from "git commit-graph write --progress" has
> become unreliable.
> 
> I think there are possibly three kinds of folks:
> 
>  - I do not want the output smudged with any progress (e.g. I am a
>    script);
> 
>  - I want to see progress if it takes very long, but do not waste
>    vertical screen real estate if it does not make me wait (e.g. I
>    am an interactive user who occasionally wants a cue to leave the
>    keyboard to grab coffee); and
> 
>  - I want to see all progress (... now who am I?  Taking a
>    screenshot to write a tutorial or something???).

I think type 3 may be people who want to understand more about the
program flow, and where it's at when it sees an error.

> In the ideal world, the three choices above should probably be
> "--progress=(no|auto|always)" where not having any defaults to one
> of them (probably "auto", as the code can use isatty() to further
> turn it to "no").

I think any no/auto/always here is tricky, because it already has a
meaning: to use or disregard isatty(2). And overriding that might be
independent of the "type" (think pack-objects on a server generating
output that's going over the wire; we have to tell it "yes, definitely
show progress even though there is no terminal", but that has nothing to
do with any "delay" decisions).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux