From 8d57f7574993deb906461d4267373e1c9c733053 Mon Sep 17 00:00:00 2001 From: Phillip Wood Date: Fri, 6 Dec 2019 16:06:10 +0000 Subject: commit: use enum value for multiple cherry-picks Add FROM_CHERRY_PICK_MULTI for a sequence of cherry-picks rather than using a separate variable. Signed-off-by: Phillip Wood Signed-off-by: Junio C Hamano --- wt-status.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'wt-status.h') diff --git a/wt-status.h b/wt-status.h index 71c3f25f43..e38e0942dc 100644 --- a/wt-status.h +++ b/wt-status.h @@ -38,9 +38,16 @@ 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 */ }; +static inline int is_from_cherry_pick(enum commit_whence whence) +{ + return whence == FROM_CHERRY_PICK_SINGLE || + whence == FROM_CHERRY_PICK_MULTI; +} + struct wt_status_change_data { int worktree_status; int index_status; -- cgit v1.2.3