File: stash.h

package info (click to toggle)
python-pygit2 1.18.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,720 kB
  • sloc: ansic: 12,584; python: 9,337; sh: 205; makefile: 26
file content (90 lines) | stat: -rw-r--r-- 2,133 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#define GIT_STASH_APPLY_OPTIONS_VERSION 1
#define GIT_STASH_SAVE_OPTIONS_VERSION ...

typedef int (*git_stash_cb)(
	size_t index,
	const char* message,
	const git_oid *stash_id,
	void *payload);

typedef enum {
	GIT_STASH_APPLY_PROGRESS_NONE = 0,
	GIT_STASH_APPLY_PROGRESS_LOADING_STASH,
	GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX,
	GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED,
	GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED,
	GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED,
	GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED,
	GIT_STASH_APPLY_PROGRESS_DONE,
} git_stash_apply_progress_t;

typedef int (*git_stash_apply_progress_cb)(
	git_stash_apply_progress_t progress,
	void *payload);

typedef enum {
	GIT_STASH_DEFAULT = 0,
	GIT_STASH_KEEP_INDEX = 1,
	GIT_STASH_INCLUDE_UNTRACKED = 2,
	GIT_STASH_INCLUDE_IGNORED = 4,
	GIT_STASH_KEEP_ALL = 8,
} git_stash_flags;

typedef enum {
	GIT_STASH_APPLY_DEFAULT = 0,
	GIT_STASH_APPLY_REINSTATE_INDEX = 1,
} git_stash_apply_flags;

typedef struct git_stash_apply_options {
	unsigned int version;
	git_stash_apply_flags flags;
	git_checkout_options checkout_options;
	git_stash_apply_progress_cb progress_cb;
	void *progress_payload;
} git_stash_apply_options;

int git_stash_save(
	git_oid *out,
	git_repository *repo,
	const git_signature *stasher,
	const char *message,
	uint32_t flags);

int git_stash_apply_options_init(
	git_stash_apply_options *opts, unsigned int version);

int git_stash_apply(
	git_repository *repo,
	size_t index,
	const git_stash_apply_options *options);

typedef struct git_stash_save_options {
	unsigned int version;
	uint32_t flags;
	const git_signature *stasher;
	const char *message;
	git_strarray paths;
} git_stash_save_options;

int git_stash_save_options_init(
	git_stash_save_options *opts,
	unsigned int version);

int git_stash_save_with_opts(
	git_oid *out,
	git_repository *repo,
	const git_stash_save_options *opts);

int git_stash_foreach(
	git_repository *repo,
	git_stash_cb callback,
	void *payload);

int git_stash_drop(
	git_repository *repo,
	size_t index);

int git_stash_pop(
	git_repository *repo,
	size_t index,
	const git_stash_apply_options *options);