giternal icon indicating copy to clipboard operation
giternal copied to clipboard

Undo unfreeze with freeze leaves modified .git.frozen.tgz

Open rocketraman opened this issue 14 years ago • 1 comments

Lets say module M is currently frozen.

I decide to unfreeze module M to continue development -- giternal now deletes the files from the frozen module and adds those deletes to the index.

Now I realize I unfroze by mistake and I want to "undo" the unfreeze. I have two options:

  1. git reset --hard HEAD, or

  2. giternal freeze.

Both of these sort of result in problems. Doing Option 1 leaves a .git directory in each module which should not exist, and needs to be manually deleted. Doing Option 2 leaves modified .git.frozen.tgz files in the index for each module.

Option 2 is "better" since the "fix" is as simple as git reset --hard HEAD.

I'm not sure what the best solution to this is, but perhaps giternal should have an "undo" command that reverses the last operation if the commit hasn't yet been done? Or alternatively, giternal freeze could check if the module was already frozen in the last commit and automatically revert to the old .git.frozen.tgz files.

rocketraman avatar Mar 17 '11 01:03 rocketraman

Funky...I'll have to think about how to handle this. Thanks for the report.

patmaddox avatar Mar 17 '11 21:03 patmaddox