# eric6.Plugins.VcsPlugins.vcsGit.GitDiffDialog

Module implementing a dialog to show the output of the git diff command process.

### Global Attributes

None

### Classes

GitDiffDialog | Class implementing a dialog to show the output of the git diff command process.

### Functions

None

## GitDiffDialog

Class implementing a dialog to show the output of the git diff command process.

### Derived from

QWidget, Ui_GitDiffDialog

### Class Attributes

None

### Class Methods

None

### Methods

GitDiffDialog | Constructor
__generatorFinished | Private slot connected to the finished signal.
__mergeFileSeparators | Private method to merge the file separator entries.
closeEvent | Protected slot implementing a close event handler.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
on_filesCombo_activated | Private slot to handle the selection of a file.
on_refreshButton_clicked | Private slot to refresh the display.
on_saveButton_clicked | Private slot to handle the Save button press.
start | Public slot to start the git diff command.

### Static Methods

None

#### GitDiffDialog (Constructor)

GitDiffDialog(vcs, parent=None)

Constructor

vcs
  reference to the vcs object
parent
  parent widget (QWidget)

#### GitDiffDialog.__generatorFinished

__generatorFinished()

Private slot connected to the finished signal.

#### GitDiffDialog.__mergeFileSeparators

__mergeFileSeparators(fileSeparators)

Private method to merge the file separator entries.

fileSeparators
  list of file separator entries to be merged

Returns:
  merged list of file separator entries

#### GitDiffDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e
  close event (QCloseEvent)

#### GitDiffDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### GitDiffDialog.on_filesCombo_activated

on_filesCombo_activated(index)

Private slot to handle the selection of a file.

index
  activated row (integer)

#### GitDiffDialog.on_refreshButton_clicked

on_refreshButton_clicked()

Private slot to refresh the display.

#### GitDiffDialog.on_saveButton_clicked

on_saveButton_clicked()

Private slot to handle the Save button press.

It saves the diff shown in the dialog to a file in the local filesystem.

#### GitDiffDialog.start

start(fn, versions=None, diffMode="work2repo", stashName="", refreshable=False)

Public slot to start the git diff command.

fn
  filename to be diffed (string)
versions
  list of versions to be diffed (list of up to 2 strings or None)
diffMode
  indication for the type of diff to be performed ( 'work2repo' compares the working tree with the HEAD commit, 'work2stage' compares the working tree with the staging area, 'stage2repo' compares the staging area with the HEAD commit, 'work2stage2repo' compares the working tree with the staging area and the staging area with the HEAD commit, 'stash' shows the diff for a stash)
stashName
  name of the stash to show a diff for (string)
refreshable
  flag indicating a refreshable diff (boolean)

Up