diff options
author | Vicent Martà <vicent@github.com> | 2012-06-07 12:29:31 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-06-07 12:29:31 -0700 |
commit | b9ebcc59e7d13507d4f8faf86d68dd3ac1a4b627 (patch) | |
tree | 01a7e8cf717a2be861f368990f6fffe4b9436dc3 /include/git2 | |
parent | cddb8efe564738873a4cf9ac63b7976d74035ae9 (diff) | |
parent | 327dc61f132a4999e006d8d8bd2080c1f5a34bf0 (diff) | |
download | libgit2-b9ebcc59e7d13507d4f8faf86d68dd3ac1a4b627.tar.gz |
Merge pull request #684 from benstraub/rev-parse
Rev parse
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/revparse.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/git2/revparse.h b/include/git2/revparse.h new file mode 100644 index 000000000..4567027e5 --- /dev/null +++ b/include/git2/revparse.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2012 the libgit2 contributors + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_git_revparse_h__ +#define INCLUDE_git_revparse_h__ + +#include "common.h" +#include "types.h" + + +/** + * @file git2/revparse.h + * @brief Git revision parsing routines + * @defgroup git_revparse Git revision parsing routines + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +/** + * Find an object, as specified by a revision string. See `man gitrevisions`, or the documentation + * for `git rev-parse` 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 on success, GIT_ERROR otherwise (use git_error_last for information about the error) + */ +GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo, const char *spec); + +/** @} */ +GIT_END_DECL +#endif |