Minor fixes for ignorecase support
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/src/attr_file.c b/src/attr_file.c
index ca8bdd8..485bcb4 100644
--- a/src/attr_file.c
+++ b/src/attr_file.c
@@ -60,6 +60,8 @@ int git_attr_file__parse_buffer(
char *context = NULL;
git_attr_rule *rule = NULL;
+ GIT_UNUSED(parsedata);
+
assert(buffer && attrs);
scan = buffer;
diff --git a/src/diff.c b/src/diff.c
index 1bda305..0e04844 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -714,7 +714,7 @@ static int diff_from_iterators(
* (or ADDED and DELETED pair if type changed)
*/
else {
- assert(oitem && nitem && entry_compare(oitem->path, nitem->path) == 0);
+ assert(oitem && nitem && entry_compare(oitem, nitem) == 0);
if (maybe_modified(old_iter, oitem, new_iter, nitem, diff) < 0 ||
git_iterator_advance(old_iter, &oitem) < 0 ||
diff --git a/src/iterator.h b/src/iterator.h
index 552d5ca..11cd218 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -11,7 +11,7 @@
#include "git2/index.h"
#include "vector.h"
-#define ITERATOR_PREFIXCMP(ITER, STR, PREFIX) (((ITER) ## .ignore_case) ? \
+#define ITERATOR_PREFIXCMP(ITER, STR, PREFIX) (((ITER).ignore_case) ? \
git__prefixcmp_icase((STR), (PREFIX)) : \
git__prefixcmp((STR), (PREFIX)))