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

Git: Integrate diff widget directly into "Git Commit" editor (like in git gui)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 4.4.0-beta1

    Description

      While the "Git Commit" editor allows me to do everything I need, I perceive the extra clicks to view the file diffs as an obstacle. Of course, one can always do a "Diff Project" (and select/deselect relevant chunks) before invoking "Git Commit", but this is an extra step done often, or worse: forgotten.

      The workflow of preparing a commit can be simplified by directly integrating the diff widget  into the "Git Commit" editor. I see the following advantages:

      1. Reduce the interaction to cycle between the file diffs. Currently, if one diff-view is open, I hit ctrl+tab and select another file. If it would be integrated directly, I just would need to click the file of interest.
      2. Having the list of changed files and the diff view displayed together helps to understand the diff and/or see relations to other files.
      3. By displaying the diff view directly after invoking the "Git Commit" editor
        1. ...one can spot obvious mistakes before committing/pushing (for the showed diff)
        2. ...the user hopefully feels encouraged to also scan also the diff of the other changed files

      Especially the last point can save quite some code review cycles.

      I guess I'm asking for an UI as "git gui". The UI sections "Unstaged Changes", "Staged Changes (Will Commit)" and the main diff view  there are very easy to grasp and use. The following things come to my mind that "git gui" does not have (yet?):

      • Add the ability to view one diff for multiple files (e.g. select multiple files in "Unstaged Changes" and the diff view show all of them; or "select all" button).
      • Add drag and drop. E.g. allow to drag and drop files between "Unstaged Changes" and "Staged Changes". Allow to drag chunks from the diff of a "Unstaged Changes" file to "Staged Changes".

      (The "Amend Last Commit" radio button in git gui is also very handy).

      Attachments

        Issue Links

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

          Activity

            People

              orgads Orgad Shaneh
              kosjar Nikolai Kosjar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes