1 #ifndef STATUS_H
2 #define STATUS_H
4 #include <stdio.h>
5 #include "string-list.h"
7 enum color_wt_status {
8 WT_STATUS_HEADER,
9 WT_STATUS_UPDATED,
10 WT_STATUS_CHANGED,
11 WT_STATUS_UNTRACKED,
12 WT_STATUS_NOBRANCH,
13 };
15 enum untracked_status_type {
16 SHOW_NO_UNTRACKED_FILES,
17 SHOW_NORMAL_UNTRACKED_FILES,
18 SHOW_ALL_UNTRACKED_FILES
19 };
20 extern enum untracked_status_type show_untracked_files;
22 struct wt_status_change_data {
23 int worktree_status;
24 int index_status;
25 int stagemask;
26 char *head_path;
27 };
29 struct wt_status {
30 int is_initial;
31 char *branch;
32 const char *reference;
33 int verbose;
34 int amend;
35 int untracked;
36 int nowarn;
37 /* These are computed during processing of the individual sections */
38 int commitable;
39 int workdir_dirty;
40 int workdir_untracked;
41 const char *index_file;
42 FILE *fp;
43 const char *prefix;
44 struct string_list change;
45 };
47 int git_status_config(const char *var, const char *value, void *cb);
48 extern int wt_status_use_color;
49 extern int wt_status_relative_paths;
50 void wt_status_prepare(struct wt_status *s);
51 void wt_status_print(struct wt_status *s);
52 void wt_status_collect_changes(struct wt_status *s);
54 #endif /* STATUS_H */