summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-03-01 15:44:18 -0500
committerPhilip Kelley <phkelley@hotmail.com>2013-03-01 15:46:21 -0500
commit3f0d0c85d06f0d5ff9ba469c6ab523bfddcc710b (patch)
tree40812383a2ae1d05788c71974d31eb86ca12ba99 /src/index.c
parent426b2e2fce17b09203f00e013e173328f50fd9e8 (diff)
downloadlibgit2-3f0d0c85d06f0d5ff9ba469c6ab523bfddcc710b.tar.gz
Disable ignore_case when writing the index to a tree
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c
index 59649083b..544f33717 100644
--- a/src/index.c
+++ b/src/index.c
@@ -242,8 +242,10 @@ static unsigned int index_merge_mode(
return index_create_mode(mode);
}
-static void index_set_ignore_case(git_index *index, bool ignore_case)
+void git_index_set_ignore_case(git_index *index, bool ignore_case)
{
+ index->ignore_case = ignore_case;
+
index->entries._cmp = ignore_case ? index_icmp : index_cmp;
index->entries_cmp_path = ignore_case ? index_icmp_path : index_cmp_path;
index->entries_search = ignore_case ? index_isrch : index_srch;
@@ -388,7 +390,7 @@ int git_index_set_caps(git_index *index, unsigned int caps)
}
if (old_ignore_case != index->ignore_case) {
- index_set_ignore_case(index, index->ignore_case);
+ git_index_set_ignore_case(index, index->ignore_case);
}
return 0;