forked from qt-creator/qt-creator
Git: Consider new files a diff
When checking for a difference and being asked to handle untracked files: Actually consider the presence of untracked files a change. Fixes git commit editor not coming up when there were no changes, only additions of new files.
This commit is contained in:
@@ -1274,9 +1274,10 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory,
|
||||
return StatusFailed;
|
||||
}
|
||||
// Unchanged (output text depending on whether -u was passed)
|
||||
if (outputText.contains("nothing to commit")
|
||||
|| outputText.contains("nothing added to commit but untracked files present"))
|
||||
if (outputText.contains("nothing to commit"))
|
||||
return StatusUnchanged;
|
||||
if (outputText.contains("nothing added to commit but untracked files present"))
|
||||
return untracked ? StatusChanged : StatusUnchanged;
|
||||
return StatusChanged;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user