X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=wt-status.h;h=73ab5d4da1c0b4766cb63501b9db06c0a7fea934;hb=f76897b6ce9964a25f4c85f9fb034cba9dd71573;hp=64f1ddc9fd9950f7dbe3b0889bf2085111814cec;hpb=2d29e070a20e1dc9129eaaa0a308f5db609b2e3a;p=platform%2Fupstream%2Fgit.git diff --git a/wt-status.h b/wt-status.h index 64f1ddc..73ab5d4 100644 --- a/wt-status.h +++ b/wt-status.h @@ -1,7 +1,6 @@ #ifndef STATUS_H #define STATUS_H -#include #include "string-list.h" #include "color.h" #include "pathspec.h" @@ -39,9 +38,22 @@ enum show_ignored_type { enum commit_whence { FROM_COMMIT, /* normal */ FROM_MERGE, /* commit came from merge */ - FROM_CHERRY_PICK /* commit came from cherry-pick */ + FROM_CHERRY_PICK_SINGLE, /* commit came from cherry-pick */ + FROM_CHERRY_PICK_MULTI, /* commit came from a sequence of cherry-picks */ + FROM_REBASE_PICK /* commit came from a pick/reword/edit */ }; +static inline int is_from_cherry_pick(enum commit_whence whence) +{ + return whence == FROM_CHERRY_PICK_SINGLE || + whence == FROM_CHERRY_PICK_MULTI; +} + +static inline int is_from_rebase(enum commit_whence whence) +{ + return whence == FROM_REBASE_PICK; +} + struct wt_status_change_data { int worktree_status; int index_status; @@ -65,6 +77,9 @@ enum wt_status_format { STATUS_FORMAT_UNSPECIFIED }; +#define HEAD_DETACHED_AT _("HEAD detached at ") +#define HEAD_DETACHED_FROM _("HEAD detached from ") + struct wt_status_state { int merge_in_progress; int am_in_progress; @@ -114,7 +129,7 @@ struct wt_status { int rename_limit; enum wt_status_format status_format; struct wt_status_state state; - unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */ + struct object_id oid_commit; /* when not Initial */ /* These are computed during processing of the individual sections */ int committable;