dkandalov / limited-wip

IntelliJ plugin to limit your work-in-progress
https://plugins.jetbrains.com/plugin/7655
111 stars 7 forks source link

should the TCR mode automatically commit after I run a test? It doesn't seem to be committing. #46

Open alexanderbird opened 2 years ago

alexanderbird commented 2 years ago

Hi Dmitry,

Thanks for your work on this plugin.

I can't tell if I've set up the plugin wrong (in which case I am offering to submit a PR to clarify the README) or of the plugin doesn't auto-commit (in which case this is a feature request).

What I was expecting from the plugin was a way to auto-commit after running a test. In the TCR workflow that I've seen described, the tests run automatically when you save and the tool either commits or reverts automatically depending on the results of the test. I assumed that the Limited Wip plugging uses the test run as the trigger instead of the file save. I thought that after I manually run a test (which passes) that Limited Wip would add all the files in my workspace to git and then make a commit. (And if the test had failed, then all those changes would be blown away and new files would be deleted.)

However, after enabling TCR mode (and disabling the other two), I find that I have uncommited changes even after running tests. I thought perhaps Limited Wip wasn't adding the files to git, so I tried manually adding the files (git add -A) and then rerunning the test. I still have my uncommited changes in my workspace.

Have I misunderstood how Limited Wip works? Or Is it not doing what it's supposed to?

Cheers, Alex

screenshot of my config which has TCR mode enabled and On Passed Test set to "commit"

dkandalov commented 2 years ago

Hi Alex!

You understood TCR correctly. It should automatically commit/revert after running tests. The plugin only commits/reverts the current change list in IDE. Maybe this is why you see uncommitted changes?

image

If it still doesn't work, can you please send the IDE version so I can try reproducing the problem.

alexanderbird commented 2 years ago

Thanks! I don't normally use the git tools built into intellij so I didn't look there before. I'll take a look next week and report back. Thanks for the response!