Single commit for bulk commands
Currently dstask undo results in the last commit being undone. This is OK for most commands but some commands can result in multiple commits so undo is unintuitive in this case, requiring manual git history manipulation.
dstask should probably record git tags or remember checkpoint refs.
some commands can result in multiple commits
what are some examples of this? do we need this?
Yes, for example if you reference several issues by ID on a done, modify, start, stop command. Also, with a confirmation, modify can change all tasks in the current context.
seems like both those examples could be recorded as a single commit. per the commonly used "one commit per logical change" git mantra, it seems that they should do this, actually.
I had considered, even implemented that. However, I decided I liked the ability to keep the commits atomic per task which affords a nice summary message per commit. I did start a git-revert range implementation in a branch but never finished it due to some complications.
I wonder, though, given I never really review the commit history anyway, for these bulk commits we could summarize the actions in the commit message body by listing the the changed tasks as we would normally do in a commit message. It sure would simplify things....
eg:
modified 32 tasks
Change: +home +fridge
* Buy some bananas
* Buy some apples
...
In fact I think that is a better solution. Thanks for the nudge @dontlaugh
It might require a bit of refactoring though, but it's a simpler solution.