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
ae99f5e2
Commit
ae99f5e2
authored
May 01, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure error messages get set
parent
f6f48f90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/index.c
+7
-2
No files found.
src/index.c
View file @
ae99f5e2
...
...
@@ -496,8 +496,10 @@ const git_index_entry *git_index_get_bypath(
git_vector_sort
(
&
index
->
entries
);
if
(
index_find
(
&
pos
,
index
,
path
,
stage
)
<
0
)
if
(
index_find
(
&
pos
,
index
,
path
,
stage
)
<
0
)
{
giterr_set
(
GITERR_INDEX
,
"Index does not contain %s"
,
path
);
return
NULL
;
}
return
git_index_get_byindex
(
index
,
pos
);
}
...
...
@@ -778,8 +780,11 @@ int git_index_remove(git_index *index, const char *path, int stage)
git_vector_sort
(
&
index
->
entries
);
if
(
index_find
(
&
position
,
index
,
path
,
stage
)
<
0
)
if
(
index_find
(
&
position
,
index
,
path
,
stage
)
<
0
)
{
giterr_set
(
GITERR_INDEX
,
"Index does not contain %s at stage %d"
,
path
,
stage
);
return
GIT_ENOTFOUND
;
}
entry
=
git_vector_get
(
&
index
->
entries
,
position
);
if
(
entry
!=
NULL
)
...
...
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