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 CommandFetch : public AbstractCommand
0015 {
0016 public:
0017     CommandFetch();
0018 
0019     Q_REQUIRED_RESULT QStringList generateArgs() const override;
0020 
0021     Q_REQUIRED_RESULT bool noFf() const;
0022     void setNoFf(bool newNoFf);
0023 
0024     Q_REQUIRED_RESULT bool ffOnly() const;
0025     void setFfOnly(bool newFfOnly);
0026 
0027     Q_REQUIRED_RESULT bool noCommit() const;
0028     void setNoCommit(bool newNoCommit);
0029 
0030     Q_REQUIRED_RESULT bool prune() const;
0031     void setPrune(bool newPrune);
0032 
0033     Q_REQUIRED_RESULT bool tags() const;
0034     void setTags(bool newTags);
0035 
0036     void parseOutputSection(const QByteArray &output, const QByteArray &errorOutput) override;
0037 
0038     Q_REQUIRED_RESULT const QString &remote() const;
0039     void setRemote(const QString &newRemote);
0040 
0041     Q_REQUIRED_RESULT const QString &branch() const;
0042     void setBranch(const QString &newBranch);
0043 
0044 private:
0045     bool mNoFf{false};
0046     bool mFfOnly{false};
0047     bool mNoCommit{false};
0048     bool mPrune{false};
0049     bool mTags{false};
0050     QString mRemote;
0051     QString mBranch;
0052 };
0053 
0054 } // namespace Git