]>
Commit | Line | Data |
---|---|---|
5b2fd956 SB |
1 | #ifndef RERERE_H |
2 | #define RERERE_H | |
3 | ||
c455c87c | 4 | #include "string-list.h" |
5b2fd956 | 5 | |
01a10b0a | 6 | struct pathspec; |
35843b11 | 7 | struct repository; |
01a10b0a | 8 | |
cb6020bb JH |
9 | #define RERERE_AUTOUPDATE 01 |
10 | #define RERERE_NOAUTOUPDATE 02 | |
9dd330e6 | 11 | #define RERERE_READONLY 04 |
cb6020bb | 12 | |
ac49f5ca MZ |
13 | /* |
14 | * Marks paths that have been hand-resolved and added to the | |
15 | * index. Set in the util field of such paths after calling | |
16 | * rerere_remaining. | |
17 | */ | |
18 | extern void *RERERE_RESOLVED; | |
19 | ||
1869bbe1 | 20 | struct rerere_dir; |
1d51eced | 21 | struct rerere_id { |
1869bbe1 | 22 | struct rerere_dir *collection; |
a13d1370 | 23 | int variant; |
1d51eced JH |
24 | }; |
25 | ||
d2865daa | 26 | int setup_rerere(struct string_list *, int); |
35843b11 NTND |
27 | #ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS |
28 | #define rerere(flags) repo_rerere(the_repository, flags) | |
29 | #endif | |
30 | int repo_rerere(struct repository *, int); | |
1d51eced JH |
31 | /* |
32 | * Given the conflict ID and the name of a "file" used for replaying | |
33 | * the recorded resolution (e.g. "preimage", "postimage"), return the | |
34 | * path to that filesystem entity. With "file" specified with NULL, | |
35 | * return the path to the directory that houses these files. | |
36 | */ | |
d2865daa | 37 | const char *rerere_path(const struct rerere_id *, const char *file); |
35843b11 NTND |
38 | int rerere_forget(struct repository *, struct pathspec *); |
39 | int rerere_remaining(struct repository *, struct string_list *); | |
d2865daa NTND |
40 | void rerere_clear(struct string_list *); |
41 | void rerere_gc(struct string_list *); | |
5b2fd956 | 42 | |
cb6020bb | 43 | #define OPT_RERERE_AUTOUPDATE(v) OPT_UYN(0, "rerere-autoupdate", (v), \ |
3424a022 | 44 | N_("update the index with reused conflict resolution if possible")) |
cb6020bb | 45 | |
5b2fd956 | 46 | #endif |