forked from qt-creator/qt-creator
Git: Support typechange
Replacing a normal file with a symbolic link. Change-Id: Id07ab339e8fcdf039b61d6e459b8d751d499f4f6 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
b98f2a3059
commit
877a10c8ef
@@ -2472,7 +2472,7 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
|
||||
filesToAdd.append(file);
|
||||
|
||||
if ((state & StagedFile) && !checked) {
|
||||
if (state & (ModifiedFile | AddedFile | DeletedFile)) {
|
||||
if (state & (ModifiedFile | AddedFile | DeletedFile | TypeChangedFile)) {
|
||||
filesToReset.append(file);
|
||||
} else if (state & (RenamedFile | CopiedFile)) {
|
||||
const QString newFile = file.mid(file.indexOf(renameSeparator) + renameSeparator.count());
|
||||
@@ -2482,7 +2482,7 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
|
||||
QTC_ASSERT(false, continue); // There should not be unmerged files when committing!
|
||||
}
|
||||
|
||||
if (state == ModifiedFile && checked) {
|
||||
if ((state == ModifiedFile || state == TypeChangedFile) && checked) {
|
||||
filesToReset.removeAll(file);
|
||||
filesToAdd.append(file);
|
||||
} else if (state == AddedFile && checked) {
|
||||
|
||||
Reference in New Issue
Block a user