ref-filter: add parse_opt_merge_filter()
Add 'parse_opt_merge_filter()' to parse '--merged' and '--no-merged' options and write macros for the same. This is copied from 'builtin/branch.c' which will eventually be removed when we port 'branch.c' to use ref-filter APIs. Based-on-patch-by: Jeff King <peff@peff.net> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d325406ef2
commit
5afcb90560
@ -745,6 +745,10 @@ static void rename_branch(const char *oldname, const char *newname, int force)
|
||||
strbuf_release(&newsection);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is duplicated in ref-filter. It will eventually be removed
|
||||
* when we port branch.c to use ref-filter APIs.
|
||||
*/
|
||||
static int opt_parse_merge_filter(const struct option *opt, const char *arg, int unset)
|
||||
{
|
||||
merge_filter = ((opt->long_name[0] == 'n')
|
||||
|
Reference in New Issue
Block a user