Merge branch 'jk/complete-checkout-sans-dwim-remote'
[gitweb.git] / builtin / for-each-ref.c
index 1a5ed20f59eefef9c32ceee6916f05a82d4199f4..eca365bf89bb64a71d02d21da29fc1e84204c1a1 100644 (file)
@@ -9,7 +9,7 @@ static char const * const for_each_ref_usage[] = {
        N_("git for-each-ref [<options>] [<pattern>]"),
        N_("git for-each-ref [--points-at <object>]"),
        N_("git for-each-ref [(--merged | --no-merged) [<commit>]]"),
-       N_("git for-each-ref [--contains [<commit>]]"),
+       N_("git for-each-ref [--contains [<commit>]] [--no-contains [<commit>]]"),
        NULL
 };
 
@@ -43,6 +43,7 @@ int cmd_for_each_ref(int argc, const char **argv, const char *prefix)
                OPT_MERGED(&filter, N_("print only refs that are merged")),
                OPT_NO_MERGED(&filter, N_("print only refs that are not merged")),
                OPT_CONTAINS(&filter.with_commit, N_("print only refs which contain the commit")),
+               OPT_NO_CONTAINS(&filter.no_commit, N_("print only refs which don't contain the commit")),
                OPT_BOOL(0, "ignore-case", &icase, N_("sorting and filtering are case insensitive")),
                OPT_END(),
        };