summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorKaartic Sivaraam <kaartic.sivaraam@gmail.com>2017-11-18 17:26:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-07 23:06:42 (GMT)
commite2bbd0cc4c1b661cc04620a6704003793b190e7e (patch)
treed7adf8e1880e447364069e11740565992dd4a753 /builtin
parentf6cea74de63c2926a15b711bec09ed3ab34c2c1e (diff)
downloadgit-e2bbd0cc4c1b661cc04620a6704003793b190e7e.zip
git-e2bbd0cc4c1b661cc04620a6704003793b190e7e.tar.gz
git-e2bbd0cc4c1b661cc04620a6704003793b190e7e.tar.bz2
branch: group related arguments of create_branch()
39bd6f726 (Allow checkout -B <current-branch> to update the current branch, 2011-11-26) added 'clobber_head' (now, 'clobber_head_ok') "before" 'track' as 'track' was closely related 'clobber_head' for the purpose the commit wanted to achieve. Looking from the perspective of how the arguments are used it turns out that 'clobber_head' is more related to 'force' than it is to 'track'. So, re-order the arguments to keep the related arguments close to each other. Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c2
-rw-r--r--builtin/checkout.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 33fd5fc..4edef5b 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -806,7 +806,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
die(_("the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead."));
create_branch(argv[0], (argc == 2) ? argv[1] : head,
- force, reflog, 0, quiet, track);
+ force, 0, reflog, quiet, track);
} else
usage_with_options(builtin_branch_usage, options);
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 7d8bcc3..6068f8d 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -640,8 +640,8 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
else
create_branch(opts->new_branch, new->name,
opts->new_branch_force ? 1 : 0,
- opts->new_branch_log,
opts->new_branch_force ? 1 : 0,
+ opts->new_branch_log,
opts->quiet,
opts->track);
new->name = opts->new_branch;