wt-status.hon commit wt-status: move many global settings to wt_status structure (d249b09)
   1#ifndef STATUS_H
   2#define STATUS_H
   3
   4#include <stdio.h>
   5#include "string-list.h"
   6
   7enum 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
  16enum untracked_status_type {
  17        SHOW_NO_UNTRACKED_FILES,
  18        SHOW_NORMAL_UNTRACKED_FILES,
  19        SHOW_ALL_UNTRACKED_FILES
  20};
  21
  22struct wt_status_change_data {
  23        int worktree_status;
  24        int index_status;
  25        int stagemask;
  26        char *head_path;
  27};
  28
  29struct 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
  51int git_status_config(const char *var, const char *value, void *cb);
  52void wt_status_prepare(struct wt_status *s);
  53void wt_status_print(struct wt_status *s);
  54void wt_status_collect_changes(struct wt_status *s);
  55
  56#endif /* STATUS_H */