# eric7.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 (Git)
  reference to the vcs object
parent (QWidget)
  parent widget

#### 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 str)
  list of file separator entries to be merged

Return:
  merged list of file separator entries

Return Type:
  list of str

#### GitDiffDialog.closeEvent

closeEvent(e)

Protected slot implementing a close event handler.

e (QCloseEvent)
  close event

#### GitDiffDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

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

button (QAbstractButton)
  button that was clicked

#### GitDiffDialog.on_filesCombo_activated

on_filesCombo_activated(index)

Private slot to handle the selection of a file.

index (int)
  activated row

#### 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 (str)
  filename to be diffed
versions (list of up to 2 str or None)
  list of versions to be diffed
diffMode (str)
  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 (str)
  name of the stash to show a diff for
refreshable (bool)
  flag indicating a refreshable diff

Raises ValueError:
  raised to indicate a bad value for the 'diffMode' parameter.

Up