summaryrefslogtreecommitdiff
path: root/src/checkout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/checkout.h')
-rw-r--r--src/checkout.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/checkout.h b/src/checkout.h
index 9a8098998..d48e263e4 100644
--- a/src/checkout.h
+++ b/src/checkout.h
@@ -22,6 +22,7 @@ typedef struct {
git_index *index;
git_pool pool;
git_vector removes;
+ git_vector conflicts;
git_buf path;
size_t workdir_len;
unsigned int strategy;
@@ -31,6 +32,29 @@ typedef struct {
size_t completed_steps;
} checkout_data;
+typedef struct {
+ const git_index_entry *ancestor;
+ const git_index_entry *ours;
+ const git_index_entry *theirs;
+
+ int name_collision:1,
+ directoryfile:1,
+ one_to_two:1;
+} checkout_conflictdata;
+
+enum {
+ CHECKOUT_ACTION__NONE = 0,
+ CHECKOUT_ACTION__REMOVE = 1,
+ CHECKOUT_ACTION__UPDATE_BLOB = 2,
+ CHECKOUT_ACTION__UPDATE_SUBMODULE = 4,
+ CHECKOUT_ACTION__CONFLICT = 8,
+ CHECKOUT_ACTION__UPDATE_CONFLICT = 16,
+ CHECKOUT_ACTION__MAX = 16,
+ CHECKOUT_ACTION__DEFER_REMOVE = 32,
+ CHECKOUT_ACTION__REMOVE_AND_UPDATE =
+ (CHECKOUT_ACTION__UPDATE_BLOB | CHECKOUT_ACTION__REMOVE),
+};
+
/**
* Update the working directory to match the target iterator. The
* expected baseline value can be passed in via the checkout options
@@ -52,6 +76,11 @@ int git_checkout__write_content(
unsigned int mode,
struct stat *st);
+void git_checkout__report_progress(
+ checkout_data *data,
+ const char *path);
+
+int git_checkout__get_conflicts(checkout_data *data, git_iterator *workdir, git_vector *pathspec);
int git_checkout__conflicts(checkout_data *data);
#endif