-I've attached a context diff for some changes I made to our local copy
-a while back to add an "--ignore-case" option just for this purpose.
-In our case it came up in the context of disting between NTFS and FAT
-remote systems. I think we ended up not needing it, but it does make
-rsync match filenames in a case insensitive manner, so it might at
-least be worth trying to see if it resolves your issue.
-
-A few caveats - both ends have to support the option - I couldn't make
-it backwards compatible because both ends exchange information about a
-sorted file list that has to sort the same way on either side (which
-very subtly bit me when I first did this). I also didn't bump the
-protocol in this patch (wasn't quite sure it was appropriate just for an
-incompatible command line option) since it was for local use.
-
-NOTE: patch updated for latest CVS source by Wayne Davison, but UNTESTED!
-
--- David
-
-/-----------------------------------------------------------------------\
- \ David Bolen \ E-mail: db3l@fitlinxx.com /
- | FitLinxx, Inc. \ Phone: (203) 708-5192 |
- / 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
-\-----------------------------------------------------------------------/
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
---- orig/lib/wildmatch.c 2003-07-14 15:12:59
-+++ lib/wildmatch.c 2004-06-18 17:27:00
-@@ -76,8 +76,20 @@ static int domatch(const unsigned char *
- ch = *++p;
- /* FALLTHROUGH */
- default:
-- if (*text != ch)
-+ if (*text != ch) {
-+ extern int ignore_case;
+--- old/exclude.c
++++ new/exclude.c
+@@ -32,6 +32,7 @@ extern int io_error;
+ extern int local_server;
+ extern int prune_empty_dirs;
+ extern int ignore_perishable;
++extern int ignore_case;
+ extern int delete_mode;
+ extern int delete_excluded;
+ extern int cvs_exclude;
+@@ -580,16 +581,17 @@ static int rule_matches(char *name, stru
+ if (litmatch_array(pattern, strings, slash_handling))
+ return ret_match;
+ } else if (anchored_match) {
+- if (strcmp(name, pattern) == 0)
++ if ((ignore_case ? strcasecmp(name, pattern)
++ : strcmp(name, pattern)) == 0)
+ return ret_match;
+ } else {
+ int l1 = strlen(name);
+ int l2 = strlen(pattern);
+- if (l2 <= l1 &&
+- strcmp(name+(l1-l2),pattern) == 0 &&
+- (l1==l2 || name[l1-(l2+1)] == '/')) {
++ if (l2 <= l1
++ && (ignore_case ? strcasecmp(name + (l1-l2), pattern)
++ : strcmp(name + (l1-l2), pattern)) == 0
++ && (l1 == l2 || name[l1 - (l2+1)] == '/'))
+ return ret_match;
+- }
+ }
+
+ return !ret_match;
+--- old/flist.c
++++ new/flist.c
+@@ -34,6 +34,7 @@ extern int inc_recurse;
+ extern int do_progress;
+ extern int always_checksum;
+ extern int module_id;
++extern int ignore_case;
+ extern int ignore_errors;
+ extern int numeric_ids;
+ extern int recurse;
+@@ -2224,7 +2225,7 @@ int f_name_cmp(struct file_struct *f1, s
+ if (type1 != type2)
+ return type1 == t_PATH ? 1 : -1;
+
+- do {
++ while (1) {
+ if (!*c1) {
+ switch (state1) {
+ case s_DIR:
+@@ -2287,7 +2288,16 @@ int f_name_cmp(struct file_struct *f1, s
+ if (type1 != type2)
+ return type1 == t_PATH ? 1 : -1;
+ }
+- } while ((dif = (int)*c1++ - (int)*c2++) == 0);