Applied to the main code as option --outbuf=N|L|B.
[rsync-patches.git] / ignore-case.diff
index 710abb3626ac8dd29b581bd5fe7c441b5e7444a0..3239ee66b3e415e2dd7ee812118cd1ca5ea6b0c1 100644 (file)
@@ -12,6 +12,7 @@ TODO:
  - Make this code handle multibyte character encodings, and honor the
    --iconv setting when converting case.
 
+based-on: 7c8f180900432e646c0a4bd02e2c4033068dbb7c
 diff --git a/exclude.c b/exclude.c
 --- a/exclude.c
 +++ b/exclude.c
@@ -21,9 +22,9 @@ diff --git a/exclude.c b/exclude.c
  #include "rsync.h"
 +#include "ifuncs.h"
  
- extern int verbose;
  extern int am_server;
-@@ -604,16 +605,15 @@ static int rule_matches(const char *fname, struct filter_struct *ex, int name_is
+ extern int am_sender;
+@@ -687,16 +688,15 @@ static int rule_matches(const char *fname, filter_rule *ex, int name_is_dir)
                if (litmatch_array(pattern, strings, slash_handling))
                        return ret_match;
        } else if (anchored_match) {
@@ -47,15 +48,15 @@ diff --git a/exclude.c b/exclude.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -35,6 +35,7 @@ extern int inc_recurse;
- extern int do_progress;
+@@ -34,6 +34,7 @@ extern int am_generator;
+ extern int inc_recurse;
  extern int always_checksum;
  extern int module_id;
 +extern int ignore_case;
  extern int ignore_errors;
  extern int numeric_ids;
  extern int recurse;
-@@ -2672,6 +2673,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3012,6 +3013,7 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
  {
        int dif;
        const uchar *c1, *c2;
@@ -63,7 +64,7 @@ diff --git a/flist.c b/flist.c
        enum fnc_state state1, state2;
        enum fnc_type type1, type2;
        enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
-@@ -2782,7 +2784,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
+@@ -3122,7 +3124,15 @@ int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
                        if (type1 != type2)
                                return type1 == t_PATH ? 1 : -1;
                }
@@ -83,9 +84,9 @@ diff --git a/flist.c b/flist.c
 diff --git a/ifuncs.h b/ifuncs.h
 --- a/ifuncs.h
 +++ b/ifuncs.h
-@@ -108,3 +108,38 @@ toUpper(const char *ptr)
- {
-       return toupper(*(unsigned char *)ptr);
+@@ -85,3 +85,38 @@ init_stat_x(stat_x *sx_p)
+       sx_p->xattr = NULL;
+ #endif
  }
 +
 +static inline int
@@ -219,7 +220,7 @@ diff --git a/options.c b/options.c
  int blocking_io = -1;
  int checksum_seed = 0;
  int inplace = 0;
-@@ -408,6 +409,7 @@ void usage(enum logcode F)
+@@ -773,6 +774,7 @@ void usage(enum logcode F)
    rprintf(F,"     --files-from=FILE       read list of source-file names from FILE\n");
    rprintf(F," -0, --from0                 all *-from/filter files are delimited by 0s\n");
    rprintf(F," -s, --protect-args          no space-splitting; only wildcard special-chars\n");
@@ -227,7 +228,7 @@ diff --git a/options.c b/options.c
    rprintf(F,"     --address=ADDRESS       bind address for outgoing socket to daemon\n");
    rprintf(F,"     --port=PORT             specify double-colon alternate port number\n");
    rprintf(F,"     --sockopts=OPTIONS      specify custom TCP options\n");
-@@ -614,6 +616,8 @@ static struct poptOption long_options[] = {
+@@ -991,6 +993,8 @@ static struct poptOption long_options[] = {
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
    {"write-batch",      0,  POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
    {"only-write-batch", 0,  POPT_ARG_STRING, &batch_name, OPT_ONLY_WRITE_BATCH, 0, 0 },
@@ -236,7 +237,7 @@ diff --git a/options.c b/options.c
    {"files-from",       0,  POPT_ARG_STRING, &files_from, 0, 0, 0 },
    {"from0",           '0', POPT_ARG_VAL,    &eol_nulls, 1, 0, 0},
    {"no-from0",         0,  POPT_ARG_VAL,    &eol_nulls, 0, 0, 0},
-@@ -1965,6 +1969,9 @@ void server_options(char **args, int *argc_p)
+@@ -2584,6 +2588,9 @@ void server_options(char **args, int *argc_p)
                args[ac++] = arg;
        }
  
@@ -249,7 +250,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.yo b/rsync.yo
 --- a/rsync.yo
 +++ b/rsync.yo
-@@ -402,6 +402,7 @@ to the detailed description below for a complete description.  verb(
+@@ -430,6 +430,7 @@ to the detailed description below for a complete description.  verb(
       --files-from=FILE       read list of source-file names from FILE
   -0, --from0                 all *from/filter files are delimited by 0s
   -s, --protect-args          no space-splitting; wildcard chars only
@@ -257,9 +258,9 @@ diff --git a/rsync.yo b/rsync.yo
       --address=ADDRESS       bind address for outgoing socket to daemon
       --port=PORT             specify double-colon alternate port number
       --sockopts=OPTIONS      specify custom TCP options
-@@ -1432,6 +1433,10 @@ If you use this option with bf(--iconv), the args will also be translated
from the local to the remote character-set.  The translation happens before
wild-cards are expanded.  See also the bf(--files-from) option.
+@@ -1710,6 +1711,10 @@ default (with is overridden by both the environment and the command-line).
This option will eventually become a new default setting at some
as-yet-undetermined point in the future.
  
 +dit(bf(--ignore-case)) This option tells rsync to ignore upper-/lower-case
 +differences when comparing filenames.  This can avoid problems when sending
@@ -271,11 +272,11 @@ diff --git a/rsync.yo b/rsync.yo
 diff --git a/wildtest.c b/wildtest.c
 --- a/wildtest.c
 +++ b/wildtest.c
-@@ -31,6 +31,7 @@ int fnmatch_errors = 0;
+@@ -30,6 +30,7 @@
+ int fnmatch_errors = 0;
  #endif
  
- int wildmatch_errors = 0;
 +int ignore_case = 0;
typedef char bool;
+ int wildmatch_errors = 0;
char number_separator = ',';