On Tue, Aug 25, 2015 at 11:33:49AM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html