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
ec6a632a
Commit
ec6a632a
authored
May 10, 2012
by
Ben Straub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplifying revparse_lookup_fully_qualified_ref.
parent
d13c1a8b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
src/revparse.c
+4
-16
No files found.
src/revparse.c
View file @
ec6a632a
...
@@ -29,24 +29,12 @@ static void set_invalid_syntax_err(const char *spec)
...
@@ -29,24 +29,12 @@ static void set_invalid_syntax_err(const char *spec)
static
int
revparse_lookup_fully_qualifed_ref
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
static
int
revparse_lookup_fully_qualifed_ref
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
{
{
git_reference
*
ref
;
git_oid
resolved
;
git_object
*
obj
=
NULL
;
if
(
!
git_reference_lookup
(
&
ref
,
repo
,
spec
))
{
git_reference
*
resolved_ref
;
if
(
!
git_reference_resolve
(
&
resolved_ref
,
ref
))
{
if
(
!
git_object_lookup
(
&
obj
,
repo
,
git_reference_oid
(
resolved_ref
),
GIT_OBJ_ANY
))
{
*
out
=
obj
;
}
git_reference_free
(
resolved_ref
);
}
git_reference_free
(
ref
);
}
if
(
obj
)
{
return
0
;
}
if
(
git_reference_name_to_oid
(
&
resolved
,
repo
,
spec
)
<
0
)
return
GIT_ERROR
;
return
GIT_ERROR
;
return
git_object_lookup
(
out
,
repo
,
&
resolved
,
GIT_OBJ_ANY
);
}
}
static
int
revparse_lookup_object
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
static
int
revparse_lookup_object
(
git_object
**
out
,
git_repository
*
repo
,
const
char
*
spec
)
...
...
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