Commit bb02af93 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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.
parent ad008b9b
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment