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

Cannot diff git branch

    XMLWordPrintable

Details

    • dd70101d7b (qt-creator/qt-creator/7.0) dd70101d7b (qt-creator/qt-creator/master) dd70101d7b (qt-creator/tqtc-qt-creator/master)

    Description

      1. Open a file from a git repository.
      2. Select "Tools" -> "Git" -> "Local Repository" -> "Branches..." from the menu.
        Creator's right sidebar appears, showing the list of branches.
      3. Right-click on a branch.
      4. Select "Diff" from the context menu.
        Creator's diff viewer will show "Retrieving data failed." In the "Version Control" view, you can read:
        Cannot run "git rev-parse --git-dir" in "": fatal: not a git repository (or any parent up to mount point /)
        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
        
        17:49:55 Running: /usr/bin/git -c diff.color=false diff -m -M -C --first-parent --unified=3 --src-prefix=a/ --dst-prefix=b/ refs/remotes/google/cfl-local-filestore
        error: unknown switch `m'
        usage: git diff --no-index [<options>] <path> <path>
        
        (...) [list of allowed options]
        
        The command "/usr/bin/git -c diff.color=false diff -m -M -C --first-parent --unified=3 --src-prefix=a/ --dst-prefix=b/ refs/remotes/google/cfl-local-filestore" terminated with exit code 129.
        

      The shown list of options does not contain "-m", but the same command succeeds when showing a diff against a revision from a log. So the actual problem seems to be that "git diff" is being executed in the wrong working directory.

      Attachments

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

        Activity

          People

            orgads Orgad Shaneh
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes