]> git.ipfire.org Git - thirdparty/git.git/blobdiff - refs.h
Merge branch 'js/default-branch-name'
[thirdparty/git.git] / refs.h
diff --git a/refs.h b/refs.h
index e010f8aec28aa47dddc5039178ac267d9aacfc5c..f212f8945e10a5a041a7f1c49a07f8f468589748 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -154,6 +154,15 @@ int repo_dwim_log(struct repository *r, const char *str, int len, struct object_
 int dwim_ref(const char *str, int len, struct object_id *oid, char **ref);
 int dwim_log(const char *str, int len, struct object_id *oid, char **ref);
 
+/*
+ * Retrieves the default branch name for newly-initialized repositories.
+ *
+ * The return value of `repo_default_branch_name()` is an allocated string. The
+ * return value of `git_default_branch_name()` is a singleton.
+ */
+const char *git_default_branch_name(void);
+char *repo_default_branch_name(struct repository *r);
+
 /*
  * A ref_transaction represents a collection of reference updates that
  * should succeed or fail together.