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
08ac23a5
Commit
08ac23a5
authored
Jun 29, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revparse: unfound reflog ref returns ENOTFOUND
parent
4de89ce7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/revparse.c
+3
-2
tests-clar/refs/revparse.c
+2
-0
No files found.
src/revparse.c
View file @
08ac23a5
...
...
@@ -29,9 +29,10 @@ 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
)
{
git_oid
resolved
;
int
error
;
if
(
git_reference_name_to_oid
(
&
resolved
,
repo
,
spec
)
<
0
)
return
GIT_ERROR
;
if
(
(
error
=
git_reference_name_to_oid
(
&
resolved
,
repo
,
spec
)
)
<
0
)
return
error
;
return
git_object_lookup
(
out
,
repo
,
&
resolved
,
GIT_OBJ_ANY
);
}
...
...
tests-clar/refs/revparse.c
View file @
08ac23a5
...
...
@@ -128,6 +128,8 @@ void test_refs_revparse__reflog(void)
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{-0}"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{1000}"
));
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_revparse_single
(
&
g_obj
,
g_repo
,
"nope@{0}"
));
test_object
(
"@{-2}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"@{-1}"
,
"a4a7dce85cf63874e984719f4fdd239f5145052f"
);
test_object
(
"master@{0}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
...
...
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