File indexing completed on 2025-01-19 04:22:43
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 #include "libkommit_export.h" 0011 namespace Git 0012 { 0013 0014 class LIBKOMMIT_EXPORT CloneCommand : public AbstractCommand 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 explicit CloneCommand(QObject *parent = nullptr); 0020 0021 Q_REQUIRED_RESULT const QString &repoUrl() const; 0022 void setRepoUrl(const QString &newRepoUrl); 0023 Q_REQUIRED_RESULT const QString &localPath() const; 0024 void setLocalPath(const QString &newLocalPath); 0025 Q_REQUIRED_RESULT const QString &branch() const; 0026 void setBranch(const QString &newBranch); 0027 Q_REQUIRED_RESULT int depth() const; 0028 void setDepth(int newDepth); 0029 Q_REQUIRED_RESULT const QString &origin() const; 0030 void setOrigin(const QString &newOrigin); 0031 Q_REQUIRED_RESULT bool recursive() const; 0032 void setRecursive(bool newRecursive); 0033 0034 Q_REQUIRED_RESULT QStringList generateArgs() const override; 0035 void parseOutputSection(const QByteArray &output, const QByteArray &errorOutput) override; 0036 Q_REQUIRED_RESULT bool supportProgress() const override; 0037 0038 private: 0039 QString mRepoUrl; 0040 QString mLocalPath; 0041 QString mBranch; 0042 int mDepth{-1}; 0043 QString mOrigin; 0044 bool mRecursive{false}; 0045 }; 0046 0047 } // namespace Git