blob: 693f125e8e4bc64ac0ccc8ac3b8dea812a397330 [file] [log] [blame]
Johannes Schindelinf83dff62019-11-13 12:40:57 +00001#ifndef ADD_INTERACTIVE_H
2#define ADD_INTERACTIVE_H
3
Johannes Schindelin25ea47a2019-12-13 08:07:51 +00004#include "color.h"
5
6struct add_i_state {
7 struct repository *r;
8 int use_color;
9 char header_color[COLOR_MAXLEN];
10 char help_color[COLOR_MAXLEN];
11 char prompt_color[COLOR_MAXLEN];
12 char error_color[COLOR_MAXLEN];
13 char reset_color[COLOR_MAXLEN];
14 char fraginfo_color[COLOR_MAXLEN];
Johannes Schindelinbcdd2972019-12-13 08:08:01 +000015 char context_color[COLOR_MAXLEN];
16 char file_old_color[COLOR_MAXLEN];
17 char file_new_color[COLOR_MAXLEN];
Johannes Schindelin180f48d2020-01-14 18:43:45 +000018
Johannes Schindelin04f816b2020-01-14 18:43:50 +000019 int use_single_key;
Johannes Schindelin08b1ea42020-01-14 18:43:46 +000020 char *interactive_diff_filter, *interactive_diff_algorithm;
Johannes Schindelin25ea47a2019-12-13 08:07:51 +000021};
22
23void init_add_i_state(struct add_i_state *s, struct repository *r);
Johannes Schindelin180f48d2020-01-14 18:43:45 +000024void clear_add_i_state(struct add_i_state *s);
Johannes Schindelin25ea47a2019-12-13 08:07:51 +000025
Johannes Schindelinf83dff62019-11-13 12:40:57 +000026struct repository;
27struct pathspec;
28int run_add_i(struct repository *r, const struct pathspec *ps);
Johannes Schindelind2a233c2019-12-21 21:57:10 +000029
30enum add_p_mode {
31 ADD_P_ADD,
Johannes Schindelin36bae1d2019-12-21 21:57:11 +000032 ADD_P_STASH,
33 ADD_P_RESET,
Johannes Schindelin52628f92019-12-21 21:57:14 +000034 ADD_P_CHECKOUT,
Johannes Schindelincee6cb72019-12-21 21:57:15 +000035 ADD_P_WORKTREE,
Johannes Schindelind2a233c2019-12-21 21:57:10 +000036};
37
38int run_add_p(struct repository *r, enum add_p_mode mode,
39 const char *revision, const struct pathspec *ps);
Johannes Schindelinf83dff62019-11-13 12:40:57 +000040
41#endif