Git: Add new files with --intent-to-add

Sometimes the file is modified after adding it, either by Qt Creator itself
or by the user.

Running Diff on such a file may look strange. Instead of showing the entire
file, it shows the diff since it was added with its initial content.

Fixes: QTCREATORBUG-23441
Change-Id: I712cc574053f39753250685aec148d2b6d7db192
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-06-13 23:15:29 +03:00
committed by Orgad Shaneh
parent 32af4d9e70
commit c0c5773345
3 changed files with 10 additions and 6 deletions

View File

@@ -185,7 +185,8 @@ public:
bool synchronousLog(const QString &workingDirectory, const QStringList &arguments,
QString *output, QString *errorMessage = nullptr,
unsigned flags = 0);
bool synchronousAdd(const QString &workingDirectory, const QStringList &files);
bool synchronousAdd(const QString &workingDirectory, const QStringList &files,
const QStringList &extraOptions = {});
bool synchronousDelete(const QString &workingDirectory,
bool force,
const QStringList &files);