diff options
author | Tobias Hunger <[email protected]> | 2010-10-06 17:50:27 +0200 |
---|---|---|
committer | Tobias Hunger <[email protected]> | 2010-10-08 14:30:27 +0200 |
commit | bb02af93dda59ce8f6cf63ab0effc1bb40d1301b (patch) | |
tree | cdcf4eba7e0e37c21171beecc4d85a734c8f40dc /src/plugins/git/gitclient.cpp | |
parent | ad008b9b57c72c1a28d7f2e43899f231d4f16226 (diff) |
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.
Diffstat (limited to 'src/plugins/git/gitclient.cpp')
-rw-r--r-- | src/plugins/git/gitclient.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 31d39ec6fc3..1e9adeb5142 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -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; } |