]> asedeno.scripts.mit.edu Git - git.git/blob - wt-status.h
cd06a4d955208962de6df37cfe1ff452918d12f1
[git.git] / wt-status.h
1 #ifndef STATUS_H
2 #define STATUS_H
3
4 #include <stdio.h>
5 #include "string-list.h"
6
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         WT_STATUS_UNMERGED,
14 };
15
16 enum untracked_status_type {
17         SHOW_NO_UNTRACKED_FILES,
18         SHOW_NORMAL_UNTRACKED_FILES,
19         SHOW_ALL_UNTRACKED_FILES
20 };
21
22 struct wt_status_change_data {
23         int worktree_status;
24         int index_status;
25         int stagemask;
26         char *head_path;
27 };
28
29 struct wt_status {
30         int is_initial;
31         char *branch;
32         const char *reference;
33         int verbose;
34         int amend;
35         int nowarn;
36         int use_color;
37         int relative_paths;
38         int submodule_summary;
39         enum untracked_status_type show_untracked_files;
40
41         /* These are computed during processing of the individual sections */
42         int commitable;
43         int workdir_dirty;
44         int workdir_untracked;
45         const char *index_file;
46         FILE *fp;
47         const char *prefix;
48         struct string_list change;
49 };
50
51 int git_status_config(const char *var, const char *value, void *cb);
52 void wt_status_prepare(struct wt_status *s);
53 void wt_status_print(struct wt_status *s);
54 void wt_status_collect_changes(struct wt_status *s);
55
56 #endif /* STATUS_H */