| 1669 | } |
| 1670 | |
| 1671 | VcsJob* GitPlugin::move(const QUrl& source, const QUrl& destination) |
| 1672 | { |
| 1673 | QDir dir = urlDir(source); |
| 1674 | |
| 1675 | QFileInfo fileInfo(source.toLocalFile()); |
| 1676 | if (fileInfo.isDir()) { |
| 1677 | if (isEmptyDirStructure(QDir(source.toLocalFile()))) { |
| 1678 | //move empty folder, git doesn't do that |
| 1679 | qCDebug(PLUGIN_GIT) << "empty folder" << source; |
| 1680 | return new StandardJob(this, KIO::move(source, destination)); |
| 1681 | } |
| 1682 | } |
| 1683 | |
| 1684 | const QStringList otherStr = getLsFiles(dir, QStringList{QStringLiteral("--others"), QStringLiteral("--"), source.toLocalFile()}, KDevelop::OutputJob::Silent); |
| 1685 | if(otherStr.isEmpty()) { |
| 1686 | auto* job = new GitJob(dir, this, KDevelop::OutputJob::Verbose); |
| 1687 | *job << "git" << "mv" << source.toLocalFile() << destination.toLocalFile(); |
| 1688 | return job; |
| 1689 | } else { |
| 1690 | return new StandardJob(this, KIO::move(source, destination)); |
| 1691 | } |
| 1692 | } |
| 1693 | |
| 1694 | void GitPlugin::parseGitRepoLocationOutput(DVcsJob* job) |
| 1695 | { |