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
9eb9e5fa
Commit
9eb9e5fa
authored
Mar 21, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iterator: cleanups
Remove some unused functions, refactor some ugliness.
parent
d712c2b2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
src/diff.c
+2
-3
src/iterator.c
+0
-0
src/iterator.h
+4
-18
No files found.
src/diff.c
View file @
9eb9e5fa
...
...
@@ -1229,9 +1229,8 @@ int git_diff__from_iterators(
/* make iterators have matching icase behavior */
if
(
DIFF_FLAG_IS_SET
(
diff
,
GIT_DIFF_IGNORE_CASE
))
{
if
((
error
=
git_iterator_set_ignore_case
(
old_iter
,
true
))
<
0
||
(
error
=
git_iterator_set_ignore_case
(
new_iter
,
true
))
<
0
)
goto
cleanup
;
git_iterator_set_ignore_case
(
old_iter
,
true
);
git_iterator_set_ignore_case
(
new_iter
,
true
);
}
/* finish initialization */
...
...
src/iterator.c
View file @
9eb9e5fa
This diff is collapsed.
Click to expand it.
src/iterator.h
View file @
9eb9e5fa
...
...
@@ -69,8 +69,6 @@ typedef struct {
int
(
*
advance_over
)(
const
git_index_entry
**
,
git_iterator_status_t
*
,
git_iterator
*
);
int
(
*
reset
)(
git_iterator
*
);
int
(
*
reset_range
)(
git_iterator
*
,
const
char
*
start
,
const
char
*
end
);
int
(
*
at_end
)(
git_iterator
*
);
void
(
*
free
)(
git_iterator
*
);
}
git_iterator_callbacks
;
...
...
@@ -232,21 +230,8 @@ GIT_INLINE(int) git_iterator_reset(git_iterator *iter)
* Go back to the start of the iteration after updating the `start` and
* `end` pathname boundaries of the iteration.
*/
GIT_INLINE
(
int
)
git_iterator_reset_range
(
git_iterator
*
iter
,
const
char
*
start
,
const
char
*
end
)
{
return
iter
->
cb
->
reset_range
(
iter
,
start
,
end
);
}
/**
* Check if the iterator is at the end
*
* @return 0 if not at end, >0 if at end
*/
GIT_INLINE
(
int
)
git_iterator_at_end
(
git_iterator
*
iter
)
{
return
iter
->
cb
->
at_end
(
iter
);
}
extern
int
git_iterator_reset_range
(
git_iterator
*
iter
,
const
char
*
start
,
const
char
*
end
);
GIT_INLINE
(
git_iterator_type_t
)
git_iterator_type
(
git_iterator
*
iter
)
{
...
...
@@ -273,7 +258,8 @@ GIT_INLINE(bool) git_iterator_ignore_case(git_iterator *iter)
return
((
iter
->
flags
&
GIT_ITERATOR_IGNORE_CASE
)
!=
0
);
}
extern
int
git_iterator_set_ignore_case
(
git_iterator
*
iter
,
bool
ignore_case
);
extern
void
git_iterator_set_ignore_case
(
git_iterator
*
iter
,
bool
ignore_case
);
extern
int
git_iterator_current_tree_entry
(
const
git_tree_entry
**
entry_out
,
git_iterator
*
iter
);
...
...
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