X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=wt-status.h;h=682b4c8f7da2c58f741a958f6488a48fd7b483b4;hb=HEAD;hp=9df9c9fad2512d7c1d7d6456cdd645d641b5a089;hpb=eb4e67288bb9d66fb46092fa30d72c4bdded0c2a;p=git.git diff --git a/wt-status.h b/wt-status.h index 9df9c9fad..682b4c8f7 100644 --- a/wt-status.h +++ b/wt-status.h @@ -13,7 +13,9 @@ enum color_wt_status { WT_STATUS_NOBRANCH, WT_STATUS_UNMERGED, WT_STATUS_LOCAL_BRANCH, - WT_STATUS_REMOTE_BRANCH + WT_STATUS_REMOTE_BRANCH, + WT_STATUS_ONBRANCH, + WT_STATUS_MAXSLOT }; enum untracked_status_type { @@ -22,6 +24,13 @@ enum untracked_status_type { SHOW_ALL_UNTRACKED_FILES }; +/* from where does this commit originate */ +enum commit_whence { + FROM_COMMIT, /* normal */ + FROM_MERGE, /* commit came from merge */ + FROM_CHERRY_PICK /* commit came from cherry-pick */ +}; + struct wt_status_change_data { int worktree_status; int index_status; @@ -38,7 +47,7 @@ struct wt_status { const char **pathspec; int verbose; int amend; - int in_merge; + enum commit_whence whence; int nowarn; int use_color; int relative_paths; @@ -46,7 +55,7 @@ struct wt_status { int show_ignored_files; enum untracked_status_type show_untracked_files; const char *ignore_submodule_arg; - char color_palette[WT_STATUS_REMOTE_BRANCH+1][COLOR_MAXLEN]; + char color_palette[WT_STATUS_MAXSLOT][COLOR_MAXLEN]; /* These are computed during processing of the individual sections */ int commitable; @@ -66,4 +75,11 @@ void wt_status_collect(struct wt_status *s); void wt_shortstatus_print(struct wt_status *s, int null_termination, int show_branch); void wt_porcelain_print(struct wt_status *s, int null_termination); +void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, ...) + ; +void status_printf(struct wt_status *s, const char *color, const char *fmt, ...) + ; +void status_printf_more(struct wt_status *s, const char *color, const char *fmt, ...) + __attribute__((format(printf, 3, 4))); + #endif /* STATUS_H */