mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-26 06:05:54 +00:00
If the strings match, git__fnmatch returns GIT_SUCCESS and GIT_ENOMATCH on failure to match. MSVC fixes: Added a test for _MSC_VER and (in that case) defined HAVE_STRING_H to 1 so it doesn't try to include <strings.h> which doesn't exist in the MSVC world. Moved the function declarations to use the modern inline ones so MSVC doesn't have a fit. Added casts everywhere so MSVC doesn't crap its pants. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
33 lines
787 B
C
33 lines
787 B
C
#ifndef INCLUDE_git_refspec_h__
|
|
#define INCLUDE_git_refspec_h__
|
|
|
|
#include "git2/types.h"
|
|
|
|
/**
|
|
* Get the source specifier
|
|
*
|
|
* @param refspec the refspec
|
|
* @return the refspec's source specifier
|
|
*/
|
|
const char *git_refspec_src(const git_refspec *refspec);
|
|
|
|
/**
|
|
* Get the destination specifier
|
|
*
|
|
* @param refspec the refspec
|
|
* @return the refspec's destination specifier
|
|
*/
|
|
const char *git_refspec_dst(const git_refspec *refspec);
|
|
|
|
/**
|
|
* Match a refspec's source descriptor with a reference name
|
|
*
|
|
* @param refspec the refspec
|
|
* @param refname the name of the reference to check
|
|
* @return GIT_SUCCESS on successful match; GIT_ENOMACH on match
|
|
* failure or an error code on other failure
|
|
*/
|
|
int git_refspec_src_match(const git_refspec *refspec, const char *refname);
|
|
|
|
#endif
|