@@ -800,7 +800,7 @@ static int edit_branch_description(const char *branch_name)
800
800
801
801
int cmd_branch(int argc, const char **argv, const char *prefix)
802
802
{
803
-
int delete = 0, rename = 0, force_create = 0, list = 0;
803
+
int delete = 0, rename = 0, force = 0, list = 0;
804
804
int verbose = 0, abbrev = -1, detached = 0;
805
805
int reflog = 0, edit_description = 0;
806
806
int quiet = 0, unset_upstream = 0;
@@ -848,7 +848,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
848
848
OPT_BOOL('l', "create-reflog", &reflog, N_("create the branch's reflog")),
849
849
OPT_BOOL(0, "edit-description", &edit_description,
850
850
N_("edit the description for the branch")),
851
-
OPT__FORCE(&force_create, N_("force creation (when already exists)")),
851
+
OPT__FORCE(&force, N_("force creation, move/rename, deletion")),
852
852
{
853
853
OPTION_CALLBACK, 0, "no-merged", &merge_filter_ref,
854
854
N_("commit"), N_("print only not merged branches"),
@@ -891,7 +891,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
891
891
if (with_commit || merge_filter != NO_FILTER)
892
892
list = 1;
893
893
894
-
if (!!delete + !!rename + !!force_create + !!new_upstream +
894
+
if (!!delete + !!rename + !!new_upstream +
895
895
list + unset_upstream > 1)
896
896
usage_with_options(builtin_branch_usage, options);
897
897
@@ -904,6 +904,11 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
904
904
colopts = 0;
905
905
}
906
906
907
+
if (force) {
908
+
delete *= 2;
909
+
rename *= 2;
910
+
}
911
+
907
912
if (delete) {
908
913
if (!argc)
909
914
die(_("branch name required"));
@@ -1020,7 +1025,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
1020
1025
1021
1026
branch_existed = ref_exists(branch->refname);
1022
1027
create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
1023
-
force_create, reflog, 0, quiet, track);
1028
+
force, reflog, 0, quiet, track);
1024
1029
1025
1030
/*
1026
1031
* We only show the instructions if the user gave us
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4