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 "filestatus.h"
0011 
0012 #include <QList>
0013 
0014 namespace Git
0015 {
0016 
0017 class CommandChangedFiles : public AbstractCommand
0018 {
0019 public:
0020     explicit CommandChangedFiles(Manager *git);
0021 
0022     Q_REQUIRED_RESULT const QList<FileStatus> &files() const;
0023     Q_REQUIRED_RESULT bool ignored() const;
0024     void setIgnored(bool newIgnored);
0025     Q_REQUIRED_RESULT bool untracked() const;
0026     void setUntracked(bool newUntracked);
0027     Q_REQUIRED_RESULT bool ignoreSubmodules() const;
0028     void setIgnoreSubmodules(bool newIgnoreSubmodules);
0029 
0030     Q_REQUIRED_RESULT QStringList generateArgs() const override;
0031     void parseOutputSection(const QByteArray &output, const QByteArray &errorOutput) override;
0032 
0033 private:
0034     QList<FileStatus> mFiles;
0035     bool mIgnored{false};
0036     bool mUntracked{false};
0037     bool mIgnoreSubmodules{true};
0038 };
0039 
0040 } // namespace Git