psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

Feature Request: `onyo undo` and (optionaly) `onyo redo` #598

Open nhjjr opened 4 months ago

nhjjr commented 4 months ago

As a convenience helper function to keep users within the onyo ... ecosystem, the onyo undo function could move the branch back to a previous commit. If possible, onyo redo would jump forward on a commit provided no new changes have been made.

If this command is used on the master branch, it has to be confirmed first (with a warning that history may be broken). Alternatively, it should only be allowed on feature branches (if possible; assuming that the default name of the main branch is consistent). On a feature branch it should outright refuse to go undo beyond the history that master is currently at. Thus, the creation of the branch is the upper limit for undoing.