File indexing completed on 2025-03-09 05:11:40
0001 /* 0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "abstractcommand.h" 0010 0011 namespace Git 0012 { 0013 0014 class LIBKOMMIT_EXPORT CommandClean : public AbstractCommand 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 enum CleanupType { 0020 AllUntrackedFiles, 0021 NonIgnoredUntrackedFiles, 0022 IgnoredFiles, 0023 }; 0024 CommandClean(); 0025 0026 Q_REQUIRED_RESULT QStringList generateArgs() const override; 0027 0028 Q_REQUIRED_RESULT bool dryRun() const; 0029 void setDryRun(bool newDryRun); 0030 Q_REQUIRED_RESULT CleanupType getType() const; 0031 void setType(CleanupType newType); 0032 Q_REQUIRED_RESULT bool removeUntrackedDirectories() const; 0033 void setRemoveUntrackedDirectories(bool newRemoveUntrackedDirectories); 0034 0035 private: 0036 bool mDryRun{false}; 0037 CleanupType type{NonIgnoredUntrackedFiles}; 0038 bool mRemoveUntrackedDirectories{false}; 0039 }; 0040 0041 }