X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wt-status.h;h=a0e75177bec925e95b4257811aae0bdee93c41f1;hb=511a3fc116799df5e3b2262f8f6e501ca73ba2fe;hp=78add09bd67c727babb61cd1eaa773bcd0c6e55e;hpb=faf1dc7223be9ffddf775916913bb8e22762cdfb;p=git.git diff --git a/wt-status.h b/wt-status.h index 78add09bd..a0e75177b 100644 --- a/wt-status.h +++ b/wt-status.h @@ -2,13 +2,16 @@ #define STATUS_H #include +#include "string-list.h" +#include "color.h" enum color_wt_status { - WT_STATUS_HEADER, + WT_STATUS_HEADER = 0, WT_STATUS_UPDATED, WT_STATUS_CHANGED, WT_STATUS_UNTRACKED, WT_STATUS_NOBRANCH, + WT_STATUS_UNMERGED, }; enum untracked_status_type { @@ -16,7 +19,13 @@ enum untracked_status_type { SHOW_NORMAL_UNTRACKED_FILES, SHOW_ALL_UNTRACKED_FILES }; -extern enum untracked_status_type show_untracked_files; + +struct wt_status_change_data { + int worktree_status; + int index_status; + int stagemask; + char *head_path; +}; struct wt_status { int is_initial; @@ -24,8 +33,13 @@ struct wt_status { const char *reference; int verbose; int amend; - int untracked; int nowarn; + int use_color; + int relative_paths; + int submodule_summary; + enum untracked_status_type show_untracked_files; + char color_palette[WT_STATUS_UNMERGED+1][COLOR_MAXLEN]; + /* These are computed during processing of the individual sections */ int commitable; int workdir_dirty; @@ -33,12 +47,12 @@ struct wt_status { const char *index_file; FILE *fp; const char *prefix; + struct string_list change; + struct string_list untracked; }; -int git_status_config(const char *var, const char *value, void *cb); -extern int wt_status_use_color; -extern int wt_status_relative_paths; void wt_status_prepare(struct wt_status *s); void wt_status_print(struct wt_status *s); +void wt_status_collect(struct wt_status *s); #endif /* STATUS_H */