diff options
author | Russell Belfer <rb@github.com> | 2013-03-09 04:39:57 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-03-09 04:39:57 +0400 |
commit | e40f1c2d23c3758968df94a17831ec5432ae6988 (patch) | |
tree | a634eb49add884f11c576b6a956b8b9e1d87357b /src/posix.h | |
parent | 9bea03ce776ed864b0556815d94d71d300ac1da3 (diff) |
Make tree iterator handle icase equivalence
There is a serious bug in the previous tree iterator implementation.
If case insensitivity resulted in member elements being equivalent
to one another, and those member elements were trees, then the
children of the colliding elements would be processed in sequence
instead of in a single flattened list. This meant that the tree
iterator was not truly acting like a case-insensitive list.
This completely reworks the tree iterator to manage lists with
case insensitive equivalence classes and advance through the items
in a unified manner in a single sorted frame.
It is possible that at a future date we might want to update this
to separate the case insensitive and case sensitive tree iterators
so that the case sensitive one could be a minimal amount of code
and the insensitive one would always know what it needed to do
without checking flags.
But there would be so much shared code between the two, that I'm
not sure it that's a win. For now, this gets what we need.
More tests are needed, though.
Diffstat (limited to 'src/posix.h')
-rw-r--r-- | src/posix.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/posix.h b/src/posix.h index 9dd0c94d3..719c8a04c 100644 --- a/src/posix.h +++ b/src/posix.h @@ -32,14 +32,13 @@ typedef int git_file; * Standard POSIX Methods * * All the methods starting with the `p_` prefix are - * direct ports of the standard POSIX methods. + * direct ports of the standard POSIX methods. * * Some of the methods are slightly wrapped to provide * saner defaults. Some of these methods are emulated * in Windows platforns. * * Use your manpages to check the docs on these. - * Straightforward */ extern int p_read(git_file fd, void *buf, size_t cnt); |