File indexing completed on 2025-01-19 04:22:45
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 "libkommit_export.h" 0009 #include <QList> 0010 #include <QString> 0011 #include <QObject> 0012 0013 namespace Git 0014 { 0015 0016 class LIBKOMMIT_EXPORT RemoteBranch 0017 { 0018 public: 0019 bool configuredPull{false}; 0020 bool configuredPush{false}; 0021 0022 QString name; 0023 QString remotePushBranch; 0024 QString remotePullBranch; 0025 enum class Status { Unknown, UpToDate, FastForwardable, LocalOutOfDate }; 0026 Status status{Status::Unknown}; 0027 0028 Q_REQUIRED_RESULT QString statusText() const; 0029 }; 0030 0031 class LIBKOMMIT_EXPORT Remote 0032 { 0033 0034 public: 0035 QString name; 0036 QString headBranch; 0037 QString fetchUrl; 0038 QString pushUrl; 0039 QList<RemoteBranch> branches; 0040 // QStringList 0041 Remote(); 0042 void parse(const QString &output); 0043 }; 0044 0045 } // namespace Git