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