Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-11-18 00:45:21 +0300
committerJunio C Hamano <gitster@pobox.com>2016-11-18 00:45:21 +0300
commit6846e8734d3c9e4d6cbe8a8ba27dae414aa5aff1 (patch)
tree32c2d6d60e2bce72ccdd460138cefabffaa31366 /builtin
parent166251c32e69e9a66913c62e9263135f8ae103e6 (diff)
parent4bd488ea7c56b673947b07511d26f2afc4ec0bd6 (diff)
Merge branch 'jk/create-branch-remove-unused-param'
Code clean-up. * jk/create-branch-remove-unused-param: create_branch: drop unused "head" parameter
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c4
-rw-r--r--builtin/checkout.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index d5d93a8c03..60cc5c8e8d 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -807,7 +807,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
* create_branch takes care of setting up the tracking
* info and making sure new_upstream is correct
*/
- create_branch(head, branch->name, new_upstream, 0, 0, 0, quiet, BRANCH_TRACK_OVERRIDE);
+ create_branch(branch->name, new_upstream, 0, 0, 0, quiet, BRANCH_TRACK_OVERRIDE);
} else if (unset_upstream) {
struct branch *branch = branch_get(argv[0]);
struct strbuf buf = STRBUF_INIT;
@@ -853,7 +853,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
strbuf_release(&buf);
branch_existed = ref_exists(branch->refname);
- create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
+ create_branch(argv[0], (argc == 2) ? argv[1] : head,
force, reflog, 0, quiet, track);
/*
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 9b2a5b31d4..512492aad9 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -630,7 +630,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
}
}
else
- create_branch(old->name, opts->new_branch, new->name,
+ create_branch(opts->new_branch, new->name,
opts->new_branch_force ? 1 : 0,
opts->new_branch_log,
opts->new_branch_force ? 1 : 0,