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 CommandCommit : public AbstractCommand 0015 { 0016 public: 0017 CommandCommit(); 0018 Q_REQUIRED_RESULT QStringList generateArgs() const override; 0019 0020 Q_REQUIRED_RESULT const QString &message() const; 0021 void setMessage(const QString &newMessage); 0022 0023 Q_REQUIRED_RESULT bool amend() const; 0024 void setAmend(bool newAmend); 0025 0026 Q_REQUIRED_RESULT OptionalBool includeStatus() const; 0027 void setIncludeStatus(OptionalBool newIncludeStatus); 0028 0029 bool parseOutput(const QByteArray &output, const QByteArray &errorOutput) override; 0030 0031 private: 0032 QString mMessage; 0033 bool mAmend{false}; 0034 OptionalBool mIncludeStatus{false}; 0035 }; 0036 0037 } // namespace Git