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

Git Branches view does not update to match the current repository after first opening Qt Creator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 9.0.0, Qt Creator 10.0.0-beta1
    • None
    • Windows 10
    • Linux/X11, Windows

    Description

      Under normal conditions, everything version control related (at least for Git) is synchronized with the currently open/active file in Qt Creator. Switch to another panel with a file that's part of another project/repo and the version control features will follow; however, there's an issue where the 'Git Branches' pane must be manually reloaded in order to start working for the first time after restarting Qt Creator if the view was left open the last time the program was closed. Otherwise, it doesn't seem to "latch" onto the active project and just remains with the default text of "<No repository>".

      I imagine the reason this hasn't been caught yet is that it's somewhat specific, as I always leave the Git branches view open as a split within the left sidebar, so it's visible as soon as the program is loaded.

      To be clear:

      1) Start Qt Creator with the 'Git Branches' view having been left open since the previous close

      2) Open any project with a Git repository

      3) Open any file within the project

      4) Observe that the Git Branches view does not update to show the information for that repository

      This will continue to be the case, even if you open additional projects and switch to files within them. The only way to get to start working is to close the split with 'Git Branches' and reopen it, or use the combo box to switch to another view and then back. After doing this the view will then keep updating correctly as described above, no matter how many projects are opened or switched between.

      If you start Qt Creator without the view visible and then open it either before or after loading a project it will work right away.

      Note that simply hitting the refresh (cycling arrows) button doesn't work as that is more-or-less a git fetch of the underlying repository and doesn't actually refresh the view itself.

      I guess the view isn't initialized quite the same when its freshly opened vs being restored from a previous session.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-28646
          # Subject Branch Project Status CR V

          Activity

            People

              aha_1980 André Hartmann
              oblivioncth Chris Heimlich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change