X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=refs.h;fp=refs.h;h=f212f8945e10a5a041a7f1c49a07f8f468589748;hp=e010f8aec28aa47dddc5039178ac267d9aacfc5c;hb=11cbda2add5d3eb7c415f1f6dd8186181a7f9874;hpb=480e78595ea531482018826d35fed0fb0529afa2 diff --git a/refs.h b/refs.h index e010f8aec2..f212f8945e 100644 --- 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.