Ring Daemon
Loading...
Searching...
No Matches
git_def.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2026 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <memory>
20#include <git2.h>
21
22namespace jami {
23
25{
26 inline void operator()(git_packbuilder* p) const { git_packbuilder_free(p); }
27};
28using GitPackBuilder = std::unique_ptr<git_packbuilder, GitPackBuilderDeleter>;
29
31{
32 inline void operator()(git_repository* p) const { git_repository_free(p); }
33};
34using GitRepository = std::unique_ptr<git_repository, GitRepositoryDeleter>;
35
37{
38 inline void operator()(git_revwalk* p) const { git_revwalk_free(p); }
39};
40using GitRevWalker = std::unique_ptr<git_revwalk, GitRevWalkerDeleter>;
41
43{
44 inline void operator()(git_commit* p) const { git_commit_free(p); }
45};
46using GitCommit = std::unique_ptr<git_commit, GitCommitDeleter>;
47
52using GitAnnotatedCommit = std::unique_ptr<git_annotated_commit, GitAnnotatedCommitDeleter>;
53
55{
56 inline void operator()(git_index* p) const { git_index_free(p); }
57};
58using GitIndex = std::unique_ptr<git_index, GitIndexDeleter>;
59
61{
62 inline void operator()(git_tree* p) const { git_tree_free(p); }
63};
64using GitTree = std::unique_ptr<git_tree, GitTreeDeleter>;
65
67{
68 inline void operator()(git_remote* p) const { git_remote_free(p); }
69};
70using GitRemote = std::unique_ptr<git_remote, GitRemoteDeleter>;
71
73{
74 inline void operator()(git_reference* p) const { git_reference_free(p); }
75};
76using GitReference = std::unique_ptr<git_reference, GitReferenceDeleter>;
77
79{
80 inline void operator()(git_signature* p) const { git_signature_free(p); }
81};
82using GitSignature = std::unique_ptr<git_signature, GitSignatureDeleter>;
83
85{
86 inline void operator()(git_object* p) const { git_object_free(p); }
87};
88using GitObject = std::unique_ptr<git_object, GitObjectDeleter>;
89
91{
92 inline void operator()(git_diff* p) const { git_diff_free(p); }
93};
94using GitDiff = std::unique_ptr<git_diff, GitDiffDeleter>;
95
97{
98 inline void operator()(git_diff_stats* p) const { git_diff_stats_free(p); }
99};
100using GitDiffStats = std::unique_ptr<git_diff_stats, GitDiffStatsDeleter>;
101
106using GitIndexConflictIterator = std::unique_ptr<git_index_conflict_iterator, GitIndexConflictIteratorDeleter>;
107
109{
110 inline void operator()(git_buf* b) const { git_buf_dispose(b); }
111};
112using GitBuf = std::unique_ptr<git_buf, GitBufDeleter>;
113
114} // namespace jami
std::unique_ptr< git_remote, GitRemoteDeleter > GitRemote
Definition git_def.h:70
std::unique_ptr< git_signature, GitSignatureDeleter > GitSignature
Definition git_def.h:82
std::unique_ptr< git_object, GitObjectDeleter > GitObject
Definition git_def.h:88
std::unique_ptr< git_repository, GitRepositoryDeleter > GitRepository
Definition git_def.h:34
void emitSignal(Args... args)
Definition jami_signal.h:64
std::unique_ptr< git_commit, GitCommitDeleter > GitCommit
Definition git_def.h:46
std::unique_ptr< git_reference, GitReferenceDeleter > GitReference
Definition git_def.h:76
std::unique_ptr< git_packbuilder, GitPackBuilderDeleter > GitPackBuilder
Definition git_def.h:28
std::unique_ptr< git_diff, GitDiffDeleter > GitDiff
Definition git_def.h:94
std::unique_ptr< git_tree, GitTreeDeleter > GitTree
Definition git_def.h:64
std::unique_ptr< git_revwalk, GitRevWalkerDeleter > GitRevWalker
Definition git_def.h:40
std::unique_ptr< git_index, GitIndexDeleter > GitIndex
Definition git_def.h:58
std::unique_ptr< git_diff_stats, GitDiffStatsDeleter > GitDiffStats
Definition git_def.h:100
std::unique_ptr< git_annotated_commit, GitAnnotatedCommitDeleter > GitAnnotatedCommit
Definition git_def.h:52
std::unique_ptr< git_buf, GitBufDeleter > GitBuf
Definition git_def.h:112
std::unique_ptr< git_index_conflict_iterator, GitIndexConflictIteratorDeleter > GitIndexConflictIterator
Definition git_def.h:106
void operator()(git_annotated_commit *p) const
Definition git_def.h:50
void operator()(git_buf *b) const
Definition git_def.h:110
void operator()(git_commit *p) const
Definition git_def.h:44
void operator()(git_diff *p) const
Definition git_def.h:92
void operator()(git_diff_stats *p) const
Definition git_def.h:98
void operator()(git_index_conflict_iterator *p) const
Definition git_def.h:104
void operator()(git_index *p) const
Definition git_def.h:56
void operator()(git_object *p) const
Definition git_def.h:86
void operator()(git_packbuilder *p) const
Definition git_def.h:26
void operator()(git_reference *p) const
Definition git_def.h:74
void operator()(git_remote *p) const
Definition git_def.h:68
void operator()(git_repository *p) const
Definition git_def.h:32
void operator()(git_revwalk *p) const
Definition git_def.h:38
void operator()(git_signature *p) const
Definition git_def.h:80
void operator()(git_tree *p) const
Definition git_def.h:62