mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-28 22:13:46 +00:00
Reintroduce git_revparse_single.
This commit is contained in:
parent
ec7e240ba4
commit
4291ad0781
@ -20,6 +20,20 @@
|
||||
*/
|
||||
GIT_BEGIN_DECL
|
||||
|
||||
/**
|
||||
*
|
||||
* Find a single object, as specified by a revision string. See `man gitrevisions`,
|
||||
* or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for
|
||||
* information on the syntax accepted.
|
||||
*
|
||||
* @param out pointer to output object
|
||||
* @param repo the repository to search in
|
||||
* @param spec the textual specification for an object
|
||||
* @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code
|
||||
*/
|
||||
GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo,
|
||||
const char *spec);
|
||||
|
||||
|
||||
/**
|
||||
* Revparse flags. These indicate the intended behavior of the spec passed to
|
||||
|
||||
@ -722,7 +722,7 @@ static int ensure_left_hand_identifier_is_not_known_yet(git_object *object, git_
|
||||
return GIT_EINVALIDSPEC;
|
||||
}
|
||||
|
||||
static int git_revparse_single(git_object **out, git_repository *repo, const char *spec)
|
||||
int git_revparse_single(git_object **out, git_repository *repo, const char *spec)
|
||||
{
|
||||
size_t pos = 0, identifier_len = 0;
|
||||
int error = -1, n;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user