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
0e7af9e7
Commit
0e7af9e7
authored
Jun 28, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revparse: unfound nth parent returns ENOTFOUND
parent
0d23c62c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
src/revparse.c
+1
-1
tests-clar/refs/revparse.c
+2
-0
No files found.
src/revparse.c
View file @
0e7af9e7
...
@@ -485,7 +485,7 @@ static int handle_caret_syntax(git_object **out, git_repository *repo, git_objec
...
@@ -485,7 +485,7 @@ static int handle_caret_syntax(git_object **out, git_repository *repo, git_objec
}
}
if
(
git_commit_parent
(
&
commit
,
commit
,
n
-
1
)
<
0
)
{
if
(
git_commit_parent
(
&
commit
,
commit
,
n
-
1
)
<
0
)
{
return
GIT_E
RROR
;
return
GIT_E
NOTFOUND
;
}
}
*
out
=
(
git_object
*
)
commit
;
*
out
=
(
git_object
*
)
commit
;
...
...
tests-clar/refs/revparse.c
View file @
0e7af9e7
...
@@ -85,6 +85,8 @@ void test_refs_revparse__nth_parent(void)
...
@@ -85,6 +85,8 @@ void test_refs_revparse__nth_parent(void)
test_object
(
"be3563a^1^1"
,
"4a202b346bb0fb0db7eff3cffeb3c70babbd2045"
);
test_object
(
"be3563a^1^1"
,
"4a202b346bb0fb0db7eff3cffeb3c70babbd2045"
);
test_object
(
"be3563a^2^1"
,
"5b5b025afb0b4c913b4c338a42934a3863bf3644"
);
test_object
(
"be3563a^2^1"
,
"5b5b025afb0b4c913b4c338a42934a3863bf3644"
);
test_object
(
"be3563a^0"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"be3563a^0"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
cl_assert_equal_i
(
GIT_ENOTFOUND
,
git_revparse_single
(
&
g_obj
,
g_repo
,
"be3563a^42"
));
}
}
void
test_refs_revparse__not_tag
(
void
)
void
test_refs_revparse__not_tag
(
void
)
...
...
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