When doing undo in the folder <somepath>, gohack should save what was undone to the file $HOME/gohack/<somepath> or to the file .gohack-redo. Command gohack redo should undo the undoing, so basically turn back what was removed (and delete redo file).
Use case in my mind is the following:
- I'm writing the pre-commit hook, which is calling
gohack undo
- I'm writing post-commit hook, which is calling
gohack redo
- (optionally) I'm including
.gohack-redo file in the .gitignore to not accidentally commit it
- I'm working as usual, being more or less sure, that replace directives would not be commited
That would be particulary convenient for multi-repo applications, which has a shared codebase in a separate repos, because allows working on the cross-repo feature (/service1 /service2 and /lib1 /lib2 folders cloned under one root), while keeping CI builds intact (which only have /service1 cloned).
When doing undo in the folder
<somepath>, gohack should save what was undone to the file$HOME/gohack/<somepath>or to the file.gohack-redo. Commandgohack redoshould undo the undoing, so basically turn back what was removed (and delete redo file).Use case in my mind is the following:
gohack undogohack redo.gohack-redofile in the.gitignoreto not accidentally commit itThat would be particulary convenient for multi-repo applications, which has a shared codebase in a separate repos, because allows working on the cross-repo feature (/service1 /service2 and /lib1 /lib2 folders cloned under one root), while keeping CI builds intact (which only have /service1 cloned).