DORMANTno replies

[PATCH 7/9] Export create_branch() from builtin-branch.c

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:44:08
Subsystem: the rest · Maintainer: Linus Torvalds

You can also create branches, in exactly the same way, with checkout -b.

Signed-off-by: Daniel Barkalow <redacted>
---
 builtin-branch.c |    4 ++--
 cache.h          |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/builtin-branch.c b/builtin-branch.c
index 089cae5..04e377d 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -422,8 +422,8 @@ static int setup_tracking(const char *new_ref, const char *orig_ref)
 	return 0;
 }
 
-static void create_branch(const char *name, const char *start_name,
-			  int force, int reflog, int track)
+void create_branch(const char *name, const char *start_name,
+		   int force, int reflog, int track)
 {
 	struct ref_lock *lock;
 	struct commit *commit;
diff --git a/cache.h b/cache.h
index 549f4bb..ee42eab 100644
--- a/cache.h
+++ b/cache.h
@@ -639,6 +639,10 @@ extern int convert_to_working_tree(const char *path, const char *src, size_t len
 /* add */
 void add_files_to_cache(int verbose, const char *prefix, const char **pathspec);
 
+/* branch */
+void create_branch(const char *name, const char *start_name,
+		   int force, int reflog, int track);
+
 /* diff.c */
 extern int diff_auto_refresh_index;
 
-- 
1.5.4.rc3.4.g16335
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help