Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:36

0001 /*
0002  * Copyright (C) the libgit2 contributors. All rights reserved.
0003  *
0004  * This file is part of libgit2, distributed under the GNU GPL v2 with
0005  * a Linking Exception. For full terms see the included COPYING file.
0006  */
0007 #ifndef INCLUDE_sys_git_refdb_h__
0008 #define INCLUDE_sys_git_refdb_h__
0009 
0010 #include "git2/common.h"
0011 #include "git2/types.h"
0012 #include "git2/oid.h"
0013 
0014 /**
0015  * @file git2/sys/refs.h
0016  * @brief Low-level Git ref creation
0017  * @defgroup git_backend Git custom backend APIs
0018  * @ingroup Git
0019  * @{
0020  */
0021 GIT_BEGIN_DECL
0022 
0023 /**
0024  * Create a new direct reference from an OID.
0025  *
0026  * @param name the reference name
0027  * @param oid the object id for a direct reference
0028  * @param peel the first non-tag object's OID, or NULL
0029  * @return the created git_reference or NULL on error
0030  */
0031 GIT_EXTERN(git_reference *) git_reference__alloc(
0032     const char *name,
0033     const git_oid *oid,
0034     const git_oid *peel);
0035 
0036 /**
0037  * Create a new symbolic reference.
0038  *
0039  * @param name the reference name
0040  * @param target the target for a symbolic reference
0041  * @return the created git_reference or NULL on error
0042  */
0043 GIT_EXTERN(git_reference *) git_reference__alloc_symbolic(
0044     const char *name,
0045     const char *target);
0046 
0047 /** @} */
0048 GIT_END_DECL
0049 #endif