rename tree-specific fileindex diff callbacks
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
diff --git a/lib/fileindex.c b/lib/fileindex.c
index 624ff8c..752d228 100644
--- a/lib/fileindex.c
+++ b/lib/fileindex.c
@@ -564,13 +564,13 @@ walk_fileindex(struct got_fileindex *fileindex, struct got_fileindex_entry *ie)
static const struct got_error *
diff_fileindex_tree(struct got_fileindex *, struct got_fileindex_entry **,
struct got_tree_object *, const char *, struct got_repository *,
- struct got_fileindex_diff_cb *, void *);
+ struct got_fileindex_diff_tree_cb *, void *);
static const struct got_error *
walk_tree(struct got_tree_entry **next, struct got_fileindex *fileindex,
struct got_fileindex_entry **ie, struct got_tree_entry *te,
const char *path, struct got_repository *repo,
- struct got_fileindex_diff_cb *cb, void *cb_arg)
+ struct got_fileindex_diff_tree_cb *cb, void *cb_arg)
{
const struct got_error *err = NULL;
@@ -623,7 +623,7 @@ static const struct got_error *
diff_fileindex_tree(struct got_fileindex *fileindex,
struct got_fileindex_entry **ie, struct got_tree_object *tree,
const char *path, struct got_repository *repo,
- struct got_fileindex_diff_cb *cb, void *cb_arg)
+ struct got_fileindex_diff_tree_cb *cb, void *cb_arg)
{
const struct got_error *err = NULL;
struct got_tree_entry *te = NULL;
@@ -683,7 +683,7 @@ diff_fileindex_tree(struct got_fileindex *fileindex,
const struct got_error *
got_fileindex_diff_tree(struct got_fileindex *fileindex,
struct got_tree_object *tree, struct got_repository *repo,
- struct got_fileindex_diff_cb *cb, void *cb_arg)
+ struct got_fileindex_diff_tree_cb *cb, void *cb_arg)
{
struct got_fileindex_entry *min;
min = RB_MIN(got_fileindex_tree, &fileindex->entries);
diff --git a/lib/got_lib_fileindex.h b/lib/got_lib_fileindex.h
index dda31f7..0336dd7 100644
--- a/lib/got_lib_fileindex.h
+++ b/lib/got_lib_fileindex.h
@@ -114,18 +114,18 @@ typedef const struct got_error *(*got_fileindex_cb)(void *,
const struct got_error *got_fileindex_for_each_entry_safe(
struct got_fileindex *, got_fileindex_cb cb, void *);
-typedef const struct got_error *(*got_fileindex_diff_old_new_cb)(void *,
+typedef const struct got_error *(*got_fileindex_diff_tree_old_new_cb)(void *,
struct got_fileindex_entry *, struct got_tree_entry *, const char *);
-typedef const struct got_error *(*got_fileindex_diff_old_cb)(void *,
+typedef const struct got_error *(*got_fileindex_diff_tree_old_cb)(void *,
struct got_fileindex_entry *, const char *);
-typedef const struct got_error *(*got_fileindex_diff_new_cb)(void *,
+typedef const struct got_error *(*got_fileindex_diff_tree_new_cb)(void *,
struct got_tree_entry *, const char *);
-struct got_fileindex_diff_cb {
- got_fileindex_diff_old_new_cb diff_old_new;
- got_fileindex_diff_old_cb diff_old;
- got_fileindex_diff_new_cb diff_new;
+struct got_fileindex_diff_tree_cb {
+ got_fileindex_diff_tree_old_new_cb diff_old_new;
+ got_fileindex_diff_tree_old_cb diff_old;
+ got_fileindex_diff_tree_new_cb diff_new;
};
const struct got_error *got_fileindex_diff_tree(struct got_fileindex *,
struct got_tree_object *, struct got_repository *,
- struct got_fileindex_diff_cb *, void *);
+ struct got_fileindex_diff_tree_cb *, void *);
diff --git a/lib/worktree.c b/lib/worktree.c
index 15110d5..62fe586 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -804,7 +804,7 @@ got_worktree_checkout_files(struct got_worktree *worktree,
char *fileindex_path = NULL, *new_fileindex_path = NULL;
struct got_fileindex *fileindex = NULL;
FILE *index = NULL, *new_index = NULL;
- struct got_fileindex_diff_cb diff_cb;
+ struct got_fileindex_diff_tree_cb diff_cb;
struct diff_cb_arg arg;
err = lock_worktree(worktree, LOCK_EX);