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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Daniel Barkalow <barkalow@xxxxxxxxxxxx>
---
 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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux