summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-06 15:36:53 -0800
committerJunio C Hamano <gitster@pobox.com>2012-03-06 15:36:53 -0800
commita365816567dff45b637ad6560b0db31741a18e41 (patch)
treecf26a0a42a449d2dfda50b7924b755dbf2abcf13
parent713194ce54ea67d3fc666ef81aaece16d0e44928 (diff)
downloadgit-a365816567dff45b637ad6560b0db31741a18e41.tar.gz
create_branch(): remove unused head parameter
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--branch.c3
-rw-r--r--branch.h6
-rw-r--r--builtin/branch.c2
-rw-r--r--builtin/checkout.c2
4 files changed, 6 insertions, 7 deletions
diff --git a/branch.c b/branch.c
index 9971820a18..0ac18e22b3 100644
--- a/branch.c
+++ b/branch.c
@@ -188,8 +188,7 @@ int validate_new_branchname(const char *name, struct strbuf *ref,
return 1;
}
-void create_branch(const char *head,
- const char *name, const char *start_name,
+void create_branch(const char *name, const char *start_name,
int force, int reflog, int clobber_head,
enum branch_track track)
{
diff --git a/branch.h b/branch.h
index b99c5a369e..055ea0d0cb 100644
--- a/branch.h
+++ b/branch.h
@@ -4,15 +4,15 @@
/* Functions for acting on the information about branches. */
/*
- * Creates a new branch, where head is the branch currently checked
- * out, name is the new branch name, start_name is the name of the
+ * Creates a new branch, where
+ * name is the new branch name, start_name is the name of the
* existing branch that the new branch should start from, force
* enables overwriting an existing (non-head) branch, reflog creates a
* reflog for the branch, and track causes the new branch to be
* configured to merge the remote branch that start_name is a tracking
* branch for (if any).
*/
-void create_branch(const char *head, const char *name, const char *start_name,
+void create_branch(const char *name, const char *start_name,
int force, int reflog,
int clobber_head, enum branch_track track);
diff --git a/builtin/branch.c b/builtin/branch.c
index d8cccf725d..1f65e0a417 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -807,7 +807,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
} else if (argc > 0 && argc <= 2) {
if (kinds != REF_LOCAL_BRANCH)
die(_("-a and -r options to 'git branch' do not make sense with a branch name"));
- create_branch(head, argv[0], (argc == 2) ? argv[1] : head,
+ create_branch(argv[0], (argc == 2) ? argv[1] : head,
force_create, reflog, 0, track);
} else
usage_with_options(builtin_branch_usage, options);
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 6b9061f26f..7e2e386580 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -539,7 +539,7 @@ static void update_refs_for_switch(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,