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
ac05086c
Commit
ac05086c
authored
Feb 25, 2016
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iterator: drop unused/unimplemented `seek`
parent
8a5a2e2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
37 deletions
+0
-37
src/iterator.c
+0
-29
src/iterator.h
+0
-8
No files found.
src/iterator.c
View file @
ac05086c
...
...
@@ -17,7 +17,6 @@
(P)->cb.current = NAME_LC ## _iterator__current; \
(P)->cb.advance = NAME_LC ## _iterator__advance; \
(P)->cb.advance_into = NAME_LC ## _iterator__advance_into; \
(P)->cb.seek = NAME_LC ## _iterator__seek; \
(P)->cb.reset = NAME_LC ## _iterator__reset; \
(P)->cb.at_end = NAME_LC ## _iterator__at_end; \
(P)->cb.free = NAME_LC ## _iterator__free; \
...
...
@@ -271,12 +270,6 @@ static int empty_iterator__noop(const git_index_entry **e, git_iterator *i)
return
GIT_ITEROVER
;
}
static
int
empty_iterator__seek
(
git_iterator
*
i
,
const
char
*
p
)
{
GIT_UNUSED
(
i
);
GIT_UNUSED
(
p
);
return
-
1
;
}
static
int
empty_iterator__reset
(
git_iterator
*
i
,
const
char
*
s
,
const
char
*
e
)
{
GIT_UNUSED
(
i
);
GIT_UNUSED
(
s
);
GIT_UNUSED
(
e
);
...
...
@@ -748,12 +741,6 @@ static int tree_iterator__advance_into(
return
tree_iterator__current
(
entry
,
self
);
}
static
int
tree_iterator__seek
(
git_iterator
*
self
,
const
char
*
prefix
)
{
GIT_UNUSED
(
self
);
GIT_UNUSED
(
prefix
);
return
-
1
;
}
static
int
tree_iterator__reset
(
git_iterator
*
self
,
const
char
*
start
,
const
char
*
end
)
{
...
...
@@ -1030,12 +1017,6 @@ static int index_iterator__advance_into(
return
index_iterator__current
(
entry
,
self
);
}
static
int
index_iterator__seek
(
git_iterator
*
self
,
const
char
*
prefix
)
{
GIT_UNUSED
(
self
);
GIT_UNUSED
(
prefix
);
return
-
1
;
}
static
int
index_iterator__reset
(
git_iterator
*
self
,
const
char
*
start
,
const
char
*
end
)
{
...
...
@@ -1498,16 +1479,6 @@ static int fs_iterator__advance(
return
fs_iterator__advance_over
(
entry
,
self
);
}
static
int
fs_iterator__seek
(
git_iterator
*
self
,
const
char
*
prefix
)
{
GIT_UNUSED
(
self
);
GIT_UNUSED
(
prefix
);
/* pop stack until matching prefix */
/* find prefix item in current frame */
/* push subdirectories as deep as possible while matching */
return
0
;
}
static
int
fs_iterator__reset
(
git_iterator
*
self
,
const
char
*
start
,
const
char
*
end
)
{
...
...
src/iterator.h
View file @
ac05086c
...
...
@@ -57,7 +57,6 @@ typedef struct {
int
(
*
current
)(
const
git_index_entry
**
,
git_iterator
*
);
int
(
*
advance
)(
const
git_index_entry
**
,
git_iterator
*
);
int
(
*
advance_into
)(
const
git_index_entry
**
,
git_iterator
*
);
int
(
*
seek
)(
git_iterator
*
,
const
char
*
prefix
);
int
(
*
reset
)(
git_iterator
*
,
const
char
*
start
,
const
char
*
end
);
int
(
*
at_end
)(
git_iterator
*
);
void
(
*
free
)(
git_iterator
*
);
...
...
@@ -200,13 +199,6 @@ GIT_INLINE(int) git_iterator_advance_into_or_over(
return
error
;
}
/* Seek is currently unimplemented */
GIT_INLINE
(
int
)
git_iterator_seek
(
git_iterator
*
iter
,
const
char
*
prefix
)
{
return
iter
->
cb
->
seek
(
iter
,
prefix
);
}
/**
* Go back to the start of the iteration.
*
...
...
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