summaryrefslogtreecommitdiff
path: root/branch.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-04 13:33:33 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-04 13:33:33 -0800
commitcde555480b95c4311819dc1f7a38cc856a9aed23 (patch)
treeafa74222656ad1c41fd10e48a7c8d40f484b87b2 /branch.h
parent3b2f8a02fa9a9e68d5215828e1d97bb4f6996976 (diff)
parent36e7ed69de2c07a0214e79bde45714b92ac30ff2 (diff)
downloadgit-cde555480b95c4311819dc1f7a38cc856a9aed23.tar.gz
Merge branch 'nd/the-index'
More codepaths become aware of working with in-core repository instance other than the default "the_repository". * nd/the-index: (22 commits) rebase-interactive.c: remove the_repository references rerere.c: remove the_repository references pack-*.c: remove the_repository references pack-check.c: remove the_repository references notes-cache.c: remove the_repository references line-log.c: remove the_repository reference diff-lib.c: remove the_repository references delta-islands.c: remove the_repository references cache-tree.c: remove the_repository references bundle.c: remove the_repository references branch.c: remove the_repository reference bisect.c: remove the_repository reference blame.c: remove implicit dependency the_repository sequencer.c: remove implicit dependency on the_repository sequencer.c: remove implicit dependency on the_index transport.c: remove implicit dependency on the_index notes-merge.c: remove implicit dependency the_repository notes-merge.c: remove implicit dependency on the_index list-objects.c: reduce the_repository references list-objects-filter.c: remove implicit dependency on the_index ...
Diffstat (limited to 'branch.h')
-rw-r--r--branch.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/branch.h b/branch.h
index 5cace4581f..29c1afa4d0 100644
--- a/branch.h
+++ b/branch.h
@@ -1,6 +1,7 @@
#ifndef BRANCH_H
#define BRANCH_H
+struct repository;
struct strbuf;
enum branch_track {
@@ -19,6 +20,8 @@ extern enum branch_track git_branch_track;
/*
* Creates a new branch, where:
*
+ * - r is the repository to add a branch to
+ *
* - name is the new branch name
*
* - start_name is the name of the existing branch that the new branch should
@@ -37,7 +40,8 @@ extern enum branch_track git_branch_track;
* that start_name is a tracking branch for (if any).
*
*/
-void create_branch(const char *name, const char *start_name,
+void create_branch(struct repository *r,
+ const char *name, const char *start_name,
int force, int clobber_head_ok,
int reflog, int quiet, enum branch_track track);
@@ -60,7 +64,7 @@ extern int validate_new_branchname(const char *name, struct strbuf *ref, int for
* Remove information about the state of working on the current
* branch. (E.g., MERGE_HEAD)
*/
-void remove_branch_state(void);
+void remove_branch_state(struct repository *r);
/*
* Configure local branch "local" as downstream to branch "remote"