Re: [FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning

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

 



(Please don't top-post on this list.)

On Sat, Aug 29, 2015 at 11:00 PM, Gabor Bernat <bernat@xxxxxxxxxxxxxx> wrote:
> Reading after it, I think the most close we can get with this is, awk
> 'BEGIN { print strftime("%c", 1271603087); }; and just ignore setting
> this value (and avoid displaying it) if that fails too. Do you agree?

strftime() in awk is a GNU-ism. It doesn't exist in awk on Mac OS X or
FreeBSD, or even the default awk on Linux (which is mawk on Linux
installations I've checked).

Most portable likely would be Perl, however, that's probably too
heavyweight inside a loop like this, even if called only once each N
iterations.

> On Sun, Aug 30, 2015 at 3:20 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>> On Sat, Aug 29, 2015 at 9:29 AM, Gabor Bernat <bernat@xxxxxxxxxxxxxx> wrote:
>>> Amended, the latest version is at https://github.com/gaborbernat/git/commit/ :)
>>> Does this looks okay, should I create a patch from this?
>>
>> Excerpt:
>>
>>     now=$(date +%s)
>>     elapsed=$(($now - $start))
>>     remaining_second=$((...))
>>     eta=$(($now + $remaining_second))
>>     finish_by=$(date -d "@$eta")
>>
>> Unfortunately, -d is not portable. On Mac OS X and FreeBSD, -d sets
>> the kernel's value for Daylight Saving Time, rather than displaying
>> the specified time as in Linux.
--
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



[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]