Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2019-12-06 19:06:10 +0300
committerJunio C Hamano <gitster@pobox.com>2019-12-06 20:32:01 +0300
commit8d57f7574993deb906461d4267373e1c9c733053 (patch)
tree63e0fee42bb0f71914096f2d9fcba0b46e0db97d /wt-status.h
parent21b11c6d1de3840dcaf3fa82dae14ca3924f689f (diff)
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 <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.h')
-rw-r--r--wt-status.h9
1 files changed, 8 insertions, 1 deletions
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;