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 #include "abstractcommand.h" 0009 #include "libkommit_export.h" 0010 0011 namespace Git 0012 { 0013 0014 class LIBKOMMIT_EXPORT CommandPush : public AbstractCommand 0015 { 0016 public: 0017 CommandPush(); 0018 QStringList generateArgs() const override; 0019 0020 Q_REQUIRED_RESULT bool force() const; 0021 void setForce(bool newForce); 0022 0023 Q_REQUIRED_RESULT const QString &remote() const; 0024 void setRemote(const QString &newRemote); 0025 0026 Q_REQUIRED_RESULT const QString &localBranch() const; 0027 void setLocalBranch(const QString &newBranch); 0028 0029 Q_REQUIRED_RESULT const QString &remoteBranch() const; 0030 void setRemoteBranch(const QString &newRemoteBranch); 0031 0032 private: 0033 QString mRemote; 0034 QString mLocalBranch; 0035 QString mRemoteBranch; 0036 bool mForce{false}; 0037 }; 0038 0039 } // namespace Git