File indexing completed on 2025-01-05 05:14:45

0001 /*
0002 SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
0003 
0004 SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "fetchobserver.h"
0010 #include "libkommit_export.h"
0011 #include <git2/checkout.h>
0012 #include <git2/types.h>
0013 
0014 namespace Git
0015 {
0016 namespace CloneCallbacks
0017 {
0018 int git_helper_checkout_notify_cb(git_checkout_notify_t why,
0019                                   const char *path,
0020                                   const git_diff_file *baseline,
0021                                   const git_diff_file *target,
0022                                   const git_diff_file *workdir,
0023                                   void *payload);
0024 
0025 void git_helper_checkout_progress_cb(const char *path, size_t completed_steps, size_t total_steps, void *payload);
0026 
0027 void git_helper_checkout_perfdata_cb(const git_checkout_perfdata *perfdata, void *payload);
0028 }
0029 
0030 class LIBKOMMIT_EXPORT CloneObserver : public FetchObserver
0031 {
0032 public:
0033     CloneObserver(QObject *parent = nullptr);
0034 
0035     void init(git_checkout_options *opts);
0036 };
0037 
0038 }