Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-17163

Reverting staged changes only unstages

    XMLWordPrintable

Details

    Description

      When I try to revert staged changes using
      Tools > Git > Current File > Undo uncommited changes, I get the output

      Nicht zum Commit vorgemerkte Änderungen nach Zurücksetzung:
      M	src/main.cpp
      Cannot reset 1 file(s) in "/home/viengelm/Programming/tests/qtwebbrowser": 
      
      09:54 Executing in /home/viengelm/Programming/tests/qtwebbrowser: /usr/bin/git reset HEAD -- src/main.cpp
      

      which is the same output I get for unstaging. Interestingly, Qt Creator asks me if it should reload the file (as if it had been reverted), but the changes are still there after reloading.

      I guess that the command unstages the file (which works despite the error message, as I mentioned in QTCREATORBUG-17156) but due to the error message, git doesn't return 0, so the reverting does not proceed.

      If I run the command a second time, it works. Probably because the unstaging doesn't fail, since the file is already unstaged.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            orgads Orgad Shaneh
            viengelm Viktor Engelmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes