git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Gabor Bernat <bernat@primeranks.net>, git@vger.kernel.org
Subject: Re: [FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning
Date: Tue, 25 Aug 2015 14:52:10 -0400	[thread overview]
Message-ID: <20150825185210.GA10032@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqh9nnz08i.fsf@gitster.dls.corp.google.com>

On Tue, Aug 25, 2015 at 11:33:49AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > +start=$(date +%s)
> 
> Is that a GNU extension?

Thanks, I meant to mention that, too. POSIX has "+" formats, but
apparently no way to get an integer number of seconds. I don't know how
widely "%s" is supported; BSD "date" seems to know about it.

> An alternative implementation may be to ask `date` every 1000
> commits (or whatever sufficiently large value that we can amortise
> the cost) to measure the rate and compute $remain based on that
> measurement.  That way, we can afford to use more portable ways to
> ask `date` about the current time and compute the "how many seconds"
> ourselves.

Yeah, that would probably be a good solution, assuming there is a
portable "how many seconds" (I do not relish the thought of
reconstructing it based on the current hours/minutes/seconds).

I wonder how awful it would be to make a tool like "git-progress", where
you'd tell it "--total=$commits --eta" on the command line, and then
occasionally print the current count its stdin. It might be a little
painful to use, though. You'd want to background it with a pipe to its
stdin, which is annoying without bash-style "<()" anonymous pipes.

-Peff

  reply	other threads:[~2015-08-25 18:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 15:01 [FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning Gabor Bernat
2015-08-25 17:12 ` Jeff King
2015-08-25 18:33   ` Junio C Hamano
2015-08-25 18:52     ` Jeff King [this message]
2015-08-25 18:54       ` Jeff King
2015-08-25 20:07         ` Gabor Bernat
2015-08-25 20:12         ` Eric Sunshine
2015-08-26  2:15           ` Jeff King
2015-08-29  9:50             ` Gabor Bernat
2015-08-29 13:29               ` Gabor Bernat
2015-08-30  1:20                 ` Eric Sunshine
2015-08-30  3:00                   ` Gabor Bernat
2015-08-30  3:15                     ` Eric Sunshine
2015-08-30  8:04                       ` Mikael Magnusson
2015-08-30  8:11                         ` Gabor Bernat
2015-08-30  8:14                           ` Mikael Magnusson
2015-08-30  8:14                         ` Eric Sunshine
2015-08-30 16:52                           ` Junio C Hamano
2015-08-30 16:58                             ` Gabor Bernat
2015-08-30 19:53                               ` Mikael Magnusson
2015-08-30 19:55                               ` Eric Sunshine
2015-08-30 19:40                             ` Eric Sunshine
2015-08-30 20:40                               ` Eric Sunshine
2015-08-31  5:06                               ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=20150825185210.GA10032@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=bernat@primeranks.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).