From: Philip Kelley Date: Mon, 17 Sep 2012 20:10:42 +0000 (-0400) Subject: Minor fixes for ignorecase support X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f08c60a51815d262979a9a95d69565e54adbdd80;p=libgit2.git Minor fixes for ignorecase support --- diff --git a/src/attr_file.c b/src/attr_file.c index ca8bdd89d..485bcb434 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 1bda305ad..0e048443d 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 552d5ca0e..11cd2182c 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)))