Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working tree contains unstaged changes #226

Open
1 of 3 tasks
denisbondar opened this issue Mar 14, 2019 · 1 comment
Open
1 of 3 tasks

Working tree contains unstaged changes #226

denisbondar opened this issue Mar 14, 2019 · 1 comment

Comments

@denisbondar
Copy link

  • I'm submitting a ...

    • 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:
  1. Open task in PHPStorm: Tools - Tasks & Contexts - Open Task...
  2. In Open Task windows select in VCS Operations - only create changelist, and in GitFlow operations - Create Feature (or Create Hotfix, etc.). Press OK.
  3. Do some changes
  4. Close task in PHPStorm: Tools - Tasks & Contexts - Close Active Task...
  5. In Close Task window select: Commit Changes and Finish Feature. Press OK.
  6. I see error in PHPStorm: Error: Please have a look at the Version Control console for more details
  7. 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
    
@OpherV
Copy link
Owner

OpherV commented Apr 6, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants