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 --- builtin/branch.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'builtin') diff --git a/builtin/branch.c b/builtin/branch.c index ddd90e6b1c..e63102e47b 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -635,6 +635,10 @@ static int print_ref_list(int kinds, int detached, int verbose, int abbrev, stru cb.pattern = pattern; cb.ret = 0; for_each_rawref(append_ref, &cb); + /* + * The following implementation is currently duplicated in ref-filter. It + * will eventually be removed when we port branch.c to use ref-filter APIs. + */ if (merge_filter != NO_FILTER) { struct commit *filter; filter = lookup_commit_reference_gently(merge_filter_ref, 0); -- cgit v1.2.3