summaryrefslogtreecommitdiff
path: root/branch.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-11-04 16:30:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-11-09 22:56:21 (GMT)
commit4bd488ea7c56b673947b07511d26f2afc4ec0bd6 (patch)
treeedb43e113c2aac7c150105de434e7f89c9905ae8 /branch.h
parent0202c411edc25940cc381bf317badcdf67670be4 (diff)
downloadgit-4bd488ea7c56b673947b07511d26f2afc4ec0bd6.zip
git-4bd488ea7c56b673947b07511d26f2afc4ec0bd6.tar.gz
git-4bd488ea7c56b673947b07511d26f2afc4ec0bd6.tar.bz2
create_branch: drop unused "head" parameter
This function used to have the caller pass in the current value of HEAD, in order to make sure we didn't clobber HEAD. In 55c4a6730, that logic moved to validate_new_branchname(), which just resolves HEAD itself. The parameter to create_branch is now unused. Since we have to update and re-wrap the docstring describing the parameters anyway, let's take this opportunity to break it out into a list, which makes it easier to find the parameters. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.h')
-rw-r--r--branch.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/branch.h b/branch.h
index b2f9649..3103eb9 100644
--- a/branch.h
+++ b/branch.h
@@ -4,15 +4,21 @@
/* 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
- * 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).
+ * 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
+ *
+ * - 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, int quiet, enum branch_track track);