]> git.ipfire.org Git - thirdparty/git.git/blame - rerere.h
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / rerere.h
CommitLineData
5b2fd956
SB
1#ifndef RERERE_H
2#define RERERE_H
3
c455c87c 4#include "string-list.h"
5b2fd956 5
01a10b0a 6struct pathspec;
35843b11 7struct 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 */
18extern void *RERERE_RESOLVED;
19
1869bbe1 20struct rerere_dir;
1d51eced 21struct rerere_id {
1869bbe1 22 struct rerere_dir *collection;
a13d1370 23 int variant;
1d51eced
JH
24};
25
55e6b354 26int setup_rerere(struct repository *,struct string_list *, int);
35843b11
NTND
27#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
28#define rerere(flags) repo_rerere(the_repository, flags)
29#endif
30int 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 37const char *rerere_path(const struct rerere_id *, const char *file);
35843b11
NTND
38int rerere_forget(struct repository *, struct pathspec *);
39int rerere_remaining(struct repository *, struct string_list *);
55e6b354
NTND
40void rerere_clear(struct repository *, struct string_list *);
41void rerere_gc(struct repository *, 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