Vagyojaka
5.5.7
Loading...
Searching...
No Matches
git
git_util.h
Go to the documentation of this file.
1
#ifndef GIT_UTIL_H
2
#define GIT_UTIL_H
3
#include <git2.h>
4
#ifdef _WIN32
5
# include <io.h>
6
# include <Windows.h>
7
# define open _open
8
# define read _read
9
# define close _close
10
# define ssize_t int
11
# define sleep(a) Sleep(a * 1000)
12
#else
13
# include <unistd.h>
14
#endif
15
16
#ifndef PRIuZ
17
/* Define the printf format specifier to use for size_t output */
18
#if defined(_MSC_VER) || defined(__MINGW32__)
19
# define PRIuZ "Iu"
20
#else
21
# define PRIuZ "zu"
22
#endif
23
#endif
24
25
#ifdef _MSC_VER
26
#define snprintf _snprintf
27
#define strcasecmp strcmpi
28
#endif
29
30
31
struct
merge_options
{
32
33
34
const
char
**
heads
;
35
size_t
heads_count
;
36
37
git_annotated_commit **
annotated
;
38
size_t
annotated_count
;
39
40
unsigned
int
no_commit
: 1;
41
};
42
43
#define UNUSED(x) (void)(x)
44
45
enum
index_mode
{
46
INDEX_NONE
,
47
INDEX_ADD
48
};
49
50
struct
index_options
{
51
int
dry_run
;
52
int
verbose
;
53
git_repository *
repo
;
54
enum
index_mode
mode
;
55
int
add_update
;
56
};
57
58
struct
args_info
{
59
int
argc
;
60
char
**
argv
;
61
int
pos
;
62
unsigned
int
opts_done
: 1;
63
};
64
65
#define ARGS_INFO_INIT { argc, argv, 0, 0 }
66
67
#endif
// GIT_UTIL_H
index_mode
index_mode
Definition
git_util.h:45
INDEX_ADD
@ INDEX_ADD
Definition
git_util.h:47
INDEX_NONE
@ INDEX_NONE
Definition
git_util.h:46
args_info
Definition
git_util.h:58
args_info::opts_done
unsigned int opts_done
Definition
git_util.h:62
args_info::argc
int argc
Definition
git_util.h:59
args_info::argv
char ** argv
Definition
git_util.h:60
args_info::pos
int pos
Definition
git_util.h:61
index_options
Definition
git_util.h:50
index_options::verbose
int verbose
Definition
git_util.h:52
index_options::dry_run
int dry_run
Definition
git_util.h:51
index_options::repo
git_repository * repo
Definition
git_util.h:53
index_options::add_update
int add_update
Definition
git_util.h:55
index_options::mode
enum index_mode mode
Definition
git_util.h:54
merge_options
Definition
git_util.h:31
merge_options::heads_count
size_t heads_count
Definition
git_util.h:35
merge_options::heads
const char ** heads
Definition
git_util.h:34
merge_options::annotated
git_annotated_commit ** annotated
Definition
git_util.h:37
merge_options::no_commit
unsigned int no_commit
Definition
git_util.h:40
merge_options::annotated_count
size_t annotated_count
Definition
git_util.h:38
Generated by
1.12.0