wt-status.c: rework the way changes to the index and work tree are summarized
[git/git.git] / wt-status.h
CommitLineData
c91f0d92
JK
1#ifndef STATUS_H
2#define STATUS_H
3
f26a0012 4#include <stdio.h>
50b7e70f 5#include "string-list.h"
f26a0012 6
c91f0d92
JK
7enum color_wt_status {
8 WT_STATUS_HEADER,
9 WT_STATUS_UPDATED,
10 WT_STATUS_CHANGED,
11 WT_STATUS_UNTRACKED,
950ce2e2 12 WT_STATUS_NOBRANCH,
c91f0d92
JK
13};
14
4bfee30a 15enum untracked_status_type {
6c2ce048
MSO
16 SHOW_NO_UNTRACKED_FILES,
17 SHOW_NORMAL_UNTRACKED_FILES,
4bfee30a
MSO
18 SHOW_ALL_UNTRACKED_FILES
19};
20extern enum untracked_status_type show_untracked_files;
21
50b7e70f
JH
22struct wt_status_change_data {
23 int worktree_status;
24 int index_status;
25 int stagemask;
26 char *head_path;
27};
28
c91f0d92
JK
29struct wt_status {
30 int is_initial;
31 char *branch;
32 const char *reference;
c91f0d92
JK
33 int verbose;
34 int amend;
2074cb0a 35 int untracked;
37d07f8f 36 int nowarn;
2a3a3c24
JR
37 /* These are computed during processing of the individual sections */
38 int commitable;
39 int workdir_dirty;
40 int workdir_untracked;
0f729f21 41 const char *index_file;
f26a0012 42 FILE *fp;
367c9886 43 const char *prefix;
50b7e70f 44 struct string_list change;
c91f0d92
JK
45};
46
ef90d6d4 47int git_status_config(const char *var, const char *value, void *cb);
32efcd91
JS
48extern int wt_status_use_color;
49extern int wt_status_relative_paths;
c91f0d92
JK
50void wt_status_prepare(struct wt_status *s);
51void wt_status_print(struct wt_status *s);
50b7e70f 52void wt_status_collect_changes(struct wt_status *s);
c91f0d92
JK
53
54#endif /* STATUS_H */