Working tree contains unstaged changes
-
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] puppy => You're not submitting a puppy. I already have one and he's adorable
-
What is the current behavior? At the moment of closing the task with enabled options "commit changes" and "finish featue" (or hotfix, bugfix etc.) I got the error "Error: Please have a look at the Version Control console for more details".
After this I just finish feature manually.
- Is this a bug? Sorry about that. If so give me explicit details how to reproduce:
- Open task in PHPStorm: Tools - Tasks & Contexts - Open Task...
- In Open Task windows select in VCS Operations - only create changelist, and in GitFlow operations - Create Feature (or Create Hotfix, etc.). Press OK.
- Do some changes
- Close task in PHPStorm: Tools - Tasks & Contexts - Close Active Task...
- In Close Task window select: Commit Changes and Finish Feature. Press OK.
- I see error in PHPStorm: Error: Please have a look at the Version Control console for more details
- In Version Control Console I see:
16:11:20.140: [project] git /usr/bin/git -c core.quotepath=false -c log.showSignature=false flow feature finish task-3876
Fatal: Working tree contains unstaged changes. Aborting.
16:11:20.316: [project] git -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- <list of changed files>
16:11:20.329: [project] git -c core.quotepath=false -c log.showSignature=false rm --ignore-unmatch --cached -- <list of deleted files>
16:11:20.346: [project] git -c core.quotepath=false -c log.showSignature=false commit -F /tmp/git-commit-msg-.txt --
- What is the expected behavior?
The feature/hotfix branch is commit and merged to master/development and deleted.
-
Please tell me about your environment:
-
Gitflow4idea version: 0.6.7
-
Gitflow version: 1.11.0 (AVH Edition)
-
IntelliJ Help -> about > click copy icon and paste here. Should look like this:
PhpStorm 2018.3.5 Build #PS-183.5912.26, built on March 7, 2019 Licensed to Denis Bondar Subscription is active until August 2, 2019 JRE: 1.8.0_152-release-1343-b28 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-46-generic -
@denisbondar Thanks for the detailed report.
I tracked down the bug to this line in IntellIj's CloseTaskDialog:
https://github.com/JetBrains/intellij-community/blob/0e91550e746c94ab6afe5c0d36450b93b587dd2d/plugins/tasks/tasks-core/src/com/intellij/tasks/actions/CloseTaskDialog.java#L103
Seems like the commit function of all the TaskDialog integrations is executed sequentially, so what happens is that the git commit and the gitflow finish actions are executed almost instantaneously, which means that the actual commit doesn't finish by the time the gitflow finish action starts.
I'm not entirely sure how to solve this, since the dialog integration doesn't provide a way to synchronously rely on other integrations. I've pinged the Jetbrains people to see if they have direction.