Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4291ad07
Commit
4291ad07
authored
Apr 15, 2013
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reintroduce git_revparse_single.
parent
ec7e240b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
include/git2/revparse.h
+14
-0
src/revparse.c
+1
-1
No files found.
include/git2/revparse.h
View file @
4291ad07
...
...
@@ -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
...
...
src/revparse.c
View file @
4291ad07
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment