The ad-hoc patches to add new arguments to a function when needed resulted in the related arguments not being close to each other. This misleads the person reading the code to believe that there isn't much relation between those arguments while it's not the case. So, re-order the arguments to keep the related arguments close to each other. Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@xxxxxxxxx> --- branch.c | 2 +- branch.h | 4 ++-- builtin/branch.c | 2 +- builtin/checkout.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/branch.c b/branch.c index 8d4360aa5..0ea105b55 100644 --- a/branch.c +++ b/branch.c @@ -229,7 +229,7 @@ N_("\n" "\"git push -u\" to set the upstream config as you push."); void create_branch(const char *name, const char *start_name, - int force, int reflog, int clobber_head_ok, + int force, int clobber_head_ok, int reflog, int quiet, enum branch_track track) { struct commit *commit; diff --git a/branch.h b/branch.h index cb6411f84..a6740bb9f 100644 --- a/branch.h +++ b/branch.h @@ -24,8 +24,8 @@ * that start_name is a tracking branch for (if any). */ void create_branch(const char *name, const char *start_name, - int force, int reflog, - int clobber_head_ok, int quiet, enum branch_track track); + int force, int clobber_head_ok, + int reflog, int quiet, enum branch_track track); /* * Validates that the requested branch may be created, returning the diff --git a/builtin/branch.c b/builtin/branch.c index 355f9ef5d..62c311478 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -773,7 +773,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 5c202b7af..4ef7a47e1 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -641,8 +641,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; -- 2.14.1.935.ge2b2bcd8a