Johannes Schindelin | f83dff6 | 2019-11-13 12:40:57 +0000 | [diff] [blame] | 1 | #ifndef ADD_INTERACTIVE_H |
| 2 | #define ADD_INTERACTIVE_H |
| 3 | |
Johannes Schindelin | 25ea47a | 2019-12-13 08:07:51 +0000 | [diff] [blame] | 4 | #include "color.h" |
| 5 | |
| 6 | struct 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 Schindelin | bcdd297 | 2019-12-13 08:08:01 +0000 | [diff] [blame] | 15 | char context_color[COLOR_MAXLEN]; |
| 16 | char file_old_color[COLOR_MAXLEN]; |
| 17 | char file_new_color[COLOR_MAXLEN]; |
Johannes Schindelin | 180f48d | 2020-01-14 18:43:45 +0000 | [diff] [blame] | 18 | |
Johannes Schindelin | 04f816b | 2020-01-14 18:43:50 +0000 | [diff] [blame] | 19 | int use_single_key; |
Johannes Schindelin | 08b1ea4 | 2020-01-14 18:43:46 +0000 | [diff] [blame] | 20 | char *interactive_diff_filter, *interactive_diff_algorithm; |
Johannes Schindelin | 25ea47a | 2019-12-13 08:07:51 +0000 | [diff] [blame] | 21 | }; |
| 22 | |
| 23 | void init_add_i_state(struct add_i_state *s, struct repository *r); |
Johannes Schindelin | 180f48d | 2020-01-14 18:43:45 +0000 | [diff] [blame] | 24 | void clear_add_i_state(struct add_i_state *s); |
Johannes Schindelin | 25ea47a | 2019-12-13 08:07:51 +0000 | [diff] [blame] | 25 | |
Johannes Schindelin | f83dff6 | 2019-11-13 12:40:57 +0000 | [diff] [blame] | 26 | struct repository; |
| 27 | struct pathspec; |
| 28 | int run_add_i(struct repository *r, const struct pathspec *ps); |
Johannes Schindelin | d2a233c | 2019-12-21 21:57:10 +0000 | [diff] [blame] | 29 | |
| 30 | enum add_p_mode { |
| 31 | ADD_P_ADD, |
Johannes Schindelin | 36bae1d | 2019-12-21 21:57:11 +0000 | [diff] [blame] | 32 | ADD_P_STASH, |
| 33 | ADD_P_RESET, |
Johannes Schindelin | 52628f9 | 2019-12-21 21:57:14 +0000 | [diff] [blame] | 34 | ADD_P_CHECKOUT, |
Johannes Schindelin | cee6cb7 | 2019-12-21 21:57:15 +0000 | [diff] [blame] | 35 | ADD_P_WORKTREE, |
Johannes Schindelin | d2a233c | 2019-12-21 21:57:10 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | int run_add_p(struct repository *r, enum add_p_mode mode, |
| 39 | const char *revision, const struct pathspec *ps); |
Johannes Schindelin | f83dff6 | 2019-11-13 12:40:57 +0000 | [diff] [blame] | 40 | |
| 41 | #endif |