Darkyenus / DarkyenusTimeTracker

Lightweight time tracker for IntelliJ platform IDEs
The Unlicense
49 stars 13 forks source link

Add to time taken on amend commit #25

Closed EpicWink closed 4 years ago

EpicWink commented 4 years ago

Currently, amending a commit will skip inserting the time-taken line. I propose that, on commit amend, the value be parsed, added to with the current tracked time amount, then replaced with the new value

Initially, you may only want to accept common formats for parsing, and error out otherwise. Common formats could include:

Darkyenus commented 4 years ago

I don't like to introduce features that only work sometimes and parsing the full message would not be easy (not to mention that it may not have all the time information, the time format may have changed, etc.).

Since I personally don't do significant work in amend commits, I don't plan on implementing this in the near future. I'll leave the issue open and I'd like to hear from others - would you want this feature? And if you would - what is your use case? How would you expect it to behave?

EpicWink commented 4 years ago

Another idea: instead of just saying "Not injecting time into amend commit", you also include the amount of time taken in the console message. This will empower the user to updated time-taken themselves, and then they can reset the tracked time if they want to

Darkyenus commented 4 years ago

That seems reasonable, I'll see if I can implement it in the next update.

Darkyenus commented 4 years ago

Resolved in fac26fd036123363295a747721056d3bb910cc4f: The time that would be injected into an amend commit is now appended as a comment. Time reset must be then done manually. (There is currently no button to reset only git time, but it might be added in #28.)

Darkyenus commented 4 years ago

e5066646ed9477d39b026426e4f23e405b030b21 added an action to reset Git time counter, see #28 or changelog for more details.