summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2015-07-07 16:06:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-03 17:25:28 (GMT)
commit5afcb90560586765bf21fb09959a8b4497804639 (patch)
treee7af9e16be17a555eb2cbaec09b15591516b0bc6 /builtin
parentd325406ef2f3c819d02ac838fb2a3f8e021d08ae (diff)
downloadgit-5afcb90560586765bf21fb09959a8b4497804639.zip
git-5afcb90560586765bf21fb09959a8b4497804639.tar.gz
git-5afcb90560586765bf21fb09959a8b4497804639.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index b42e5b6..ddd90e6 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -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')