CommandDelete: Rework deletion logic

Allow deleting files from index which still exist
on the fileystem without passing their path to "qss delete".

Thus: "qss delete --deleted" deletes all files which
don't exist anymore.

Also, fix some bugs in offset calculation.
这个提交包含在:
2020-08-30 18:12:42 +02:00
父节点 30c077ad6d
当前提交 a1fbf35cde
修改 2 个文件,包含 30 行新增11 行删除

查看文件

@@ -10,7 +10,7 @@ class CommandDelete : public Command
int handle(QStringList arguments) override;
private:
int removeNonExistent(bool verbose, bool dryRun, QString pattern);
int remove(QString pattern, bool onlyDeleted, bool verbose, bool dryRun);
int removePaths(const QStringList &paths, bool verbose, bool dryRun);
};