Revert "Merge branch 'ps/contains-id-error-message' into next"
[gitweb.git] / builtin / branch.c
index 43442c12e0499e266e68612e43d93172699a355c..6d0cea9d4bcc4eb866280d6424a6dec32b5f9c87 100644 (file)
@@ -596,10 +596,10 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                OPT__COLOR(&branch_use_color, N_("use colored output")),
                OPT_SET_INT('r', "remotes",     &filter.kind, N_("act on remote-tracking branches"),
                        FILTER_REFS_REMOTES),
-               OPT_CONTAINS(&filter.with_commit_strs, N_("print only branches that contain the commit")),
-               OPT_NO_CONTAINS(&filter.no_commit_strs, N_("print only branches that don't contain the commit")),
-               OPT_WITH(&filter.with_commit_strs, N_("print only branches that contain the commit")),
-               OPT_WITHOUT(&filter.no_commit_strs, N_("print only branches that don't contain the commit")),
+               OPT_CONTAINS(&filter.with_commit, N_("print only branches that contain the commit")),
+               OPT_NO_CONTAINS(&filter.no_commit, N_("print only branches that don't contain the commit")),
+               OPT_WITH(&filter.with_commit, N_("print only branches that contain the commit")),
+               OPT_WITHOUT(&filter.no_commit, N_("print only branches that don't contain the commit")),
                OPT__ABBREV(&filter.abbrev),
 
                OPT_GROUP(N_("Specific git-branch actions:")),
@@ -615,7 +615,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
                OPT_BOOL(0, "edit-description", &edit_description,
                         N_("edit the description for the branch")),
-               OPT__FORCE(&force, N_("force creation, move/rename, deletion")),
+               OPT__FORCE(&force, N_("force creation, move/rename, deletion"), PARSE_OPT_NOCOMPLETE),
                OPT_MERGED(&filter, N_("print only branches that are merged")),
                OPT_NO_MERGED(&filter, N_("print only branches that are not merged")),
                OPT_COLUMN(0, "column", &colopts, N_("list branches in columns")),
@@ -657,8 +657,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
        if (!delete && !rename && !copy && !edit_description && !new_upstream && !unset_upstream && argc == 0)
                list = 1;
 
-       if (filter.with_commit_strs.nr || filter.merge != REF_FILTER_MERGED_NONE || filter.points_at.nr ||
-           filter.no_commit_strs.nr)
+       if (filter.with_commit || filter.merge != REF_FILTER_MERGED_NONE || filter.points_at.nr ||
+           filter.no_commit)
                list = 1;
 
        if (!!delete + !!rename + !!copy + !!new_upstream +