git-time-metric / gtm

Simple, seamless, lightweight time tracking for Git
MIT License
977 stars 52 forks source link

Stop tracking #19

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi It would be nice to have option to only track time spent editting files ex. if i open some files in Intellij IDEA or in vim, and start editting, and then I will close it, go for a run before commiting, gtm still tracks time spent. You could have new event file in .gtm folder, and with "O /path/to/file" of "C /path/to/file", where O stands for opened, and C for closed. I could help you with that if you wish, cuz' I think it is really great tool.

mschenk42 commented 8 years ago

In our upcoming release we are making some changes to the tracking algorithm that we believe will do what you are asking for. We are changing the algorithm to not add idle time for the last event. So when you stop editing and go for a run, that will be the last recorded event for the current epoch minute. That may sound somewhat confusing, so check out this link about how we track time.

Another feature you will see in the release is tracking time you spend in the terminal/command line.

We hope to release a beta version by the end of the week.

BTW thanks for the praise. We're happy that you and others find this tool useful.

ghost commented 8 years ago

Its great to here that. And I have found another bug, I don't know if I'm doing it right, but when I pushgtm, clone repo into other directory, do gtm init, and git fetchgtm I have this different results. Ignoring even that I don't get time spent, but also wrong commit, and date. screenshot from 2016-09-14 22-16-27

mschenk42 commented 8 years ago

On the cloned repo try a git log -5 --show-notes=gtm-data to see if there any gtm-data notes. This will list the last 5 commits assuming you've committed and pushed and fetched the notes data for these. Try the same on the original repo and please share the results here.

ghost commented 8 years ago

Now it magically started to work, maybe github needed some time to process gtm notes. Yesterday, I've removed that repo clone, but today when I cloned it once again, and fetched gtm it shows correct data on gtm report. Sorry for this, but I still don't get why this happened. Or that fetchgtm script has bugged, but now when I did it second time it works, and I can't recreate how I did it yesterday. Again sorry bothering you.

mschenk42 commented 8 years ago

No problem, we appreciate the feedback and interest.