diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 16:56:38 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-29 18:16:46 -0400 |
| commit | 75a4636f502908ddd406a69a4b065e29b79276da (patch) | |
| tree | 8e2a514a518e4efd4746c31e629a8cf7120afcd7 /src/iterator.c | |
| parent | 006548da91bfe05375ae0e786c6c13e9bad85a40 (diff) | |
| download | libgit2-75a4636f502908ddd406a69a4b065e29b79276da.tar.gz | |
git__tolower: a tolower() that isn't dumb
Some brain damaged tolower() implementations appear to want to
take the locale into account, and this may require taking some
insanely aggressive lock on the locale and slowing down what should
be the most trivial of trivial calls for people who just want to
downcase ASCII.
Diffstat (limited to 'src/iterator.c')
| -rw-r--r-- | src/iterator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/iterator.c b/src/iterator.c index c5c5fd7ce..52b4cd724 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -1401,10 +1401,10 @@ GIT_INLINE(bool) workdir_path_is_dotgit(const git_buf *path) if (path->ptr[len - 1] == '/') len--; - if (tolower(path->ptr[len - 1]) != 't' || - tolower(path->ptr[len - 2]) != 'i' || - tolower(path->ptr[len - 3]) != 'g' || - tolower(path->ptr[len - 4]) != '.') + if (git__tolower(path->ptr[len - 1]) != 't' || + git__tolower(path->ptr[len - 2]) != 'i' || + git__tolower(path->ptr[len - 3]) != 'g' || + git__tolower(path->ptr[len - 4]) != '.') return false; return (len == 4 || path->ptr[len - 5] == '/'); |
