From 35257aa01203bae74f9fb856fb02c10c4b3836e6 Mon Sep 17 00:00:00 2001 From: Karthik Nayak Date: Tue, 7 Jul 2015 21:36:12 +0530 Subject: ref-filter: implement '--merged' and '--no-merged' options In 'branch -l' we have '--merged' option which only lists refs (branches) merged into the named commit and '--no-merged' option which only lists refs (branches) not merged into the named commit. Implement these two options in ref-filter.{c,h} so that other commands can benefit from this. Based-on-patch-by: Jeff King Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak Signed-off-by: Junio C Hamano --- ref-filter.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ref-filter.h') diff --git a/ref-filter.h b/ref-filter.h index 443cfa717..f1151749a 100644 --- a/ref-filter.h +++ b/ref-filter.h @@ -31,6 +31,7 @@ struct ref_array_item { unsigned char objectname[20]; int flag; const char *symref; + struct commit *commit; struct atom_value *value; char refname[FLEX_ARRAY]; }; @@ -43,6 +44,13 @@ struct ref_array { struct ref_filter { const char **name_patterns; struct sha1_array points_at; + + enum { + REF_FILTER_MERGED_NONE = 0, + REF_FILTER_MERGED_INCLUDE, + REF_FILTER_MERGED_OMIT + } merge; + struct commit *merge_commit; }; struct ref_filter_cbdata { -- cgit v1.2.1