gohack icon indicating copy to clipboard operation
gohack copied to clipboard

gohack redo

Open strowk opened this issue 6 years ago • 0 comments

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:

  1. I'm writing the pre-commit hook, which is calling gohack undo
  2. I'm writing post-commit hook, which is calling gohack redo
  3. (optionally) I'm including .gohack-redo file in the .gitignore to not accidentally commit it
  4. 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).

strowk avatar Dec 17 '19 22:12 strowk