Closed EpicWink closed 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?
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
That seems reasonable, I'll see if I can implement it in the next update.
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.)
e5066646ed9477d39b026426e4f23e405b030b21 added an action to reset Git time counter, see #28 or changelog for more details.
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:
Took {{lh "hour"s}} {{lm "minute"s}} {{ts "second"s}}
)Took {{lh}}:{{lm}}:{{ts}}
)