The patches for 3.3.0.
[rsync-patches.git] / clone-dest.diff
index 5135f2d48dbce97d9fcf1a7acce43bf9c5dda95b..5ff5107df506084cc40346c97a6d061668352a89 100644 (file)
@@ -13,11 +13,11 @@ To use this patch, run these commands for a successful build:
     ./configure                         (optional if already run)
     make
 
-based-on: c3b553a93f7090bcbb89c08405f1a5f1c175c864
+based-on: 6c8ca91c731b7bf2b081694bda85b7dadc2b7aff
 diff --git a/Makefile.in b/Makefile.in
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -51,7 +51,7 @@ popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
+@@ -53,7 +53,7 @@ popt_OBJS=popt/findme.o  popt/popt.o  popt/poptconfig.o \
        popt/popthelp.o popt/poptparse.o
  OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(DAEMON_OBJ) $(LIBOBJ) @BUILD_ZLIB@ @BUILD_POPT@
  
@@ -26,7 +26,7 @@ diff --git a/Makefile.in b/Makefile.in
  
  # Programs we must have to run the test cases
  CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \
-@@ -166,7 +166,7 @@ getgroups$(EXEEXT): getgroups.o
+@@ -170,7 +170,7 @@ getgroups$(EXEEXT): getgroups.o
  getfsdev$(EXEEXT): getfsdev.o
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ getfsdev.o $(LIBS)
  
@@ -38,7 +38,7 @@ diff --git a/Makefile.in b/Makefile.in
 diff --git a/generator.c b/generator.c
 --- a/generator.c
 +++ b/generator.c
-@@ -959,7 +959,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -962,7 +962,7 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                        best_match = j;
                        match_level = 2;
                }
@@ -47,7 +47,7 @@ diff --git a/generator.c b/generator.c
                        best_match = j;
                        match_level = 3;
                        break;
-@@ -985,9 +985,16 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
+@@ -988,9 +988,16 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx,
                                goto got_nothing_for_ya;
                }
  #ifdef SUPPORT_HARD_LINKS
@@ -67,7 +67,7 @@ diff --git a/generator.c b/generator.c
                        if (atimes_ndx)
                                set_file_attrs(fname, file, sxp, NULL, 0);
                        if (preserve_hard_links && F_IS_HLINKED(file))
-@@ -1101,7 +1108,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
+@@ -1104,7 +1111,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
  
        if (match_level == 3) {
  #ifdef SUPPORT_HARD_LINKS
@@ -79,7 +79,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -577,7 +577,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
+@@ -582,7 +582,7 @@ enum {OPT_SERVER = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE,
        OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_BLOCK_SIZE,
@@ -88,7 +88,7 @@ diff --git a/options.c b/options.c
        OPT_OLD_COMPRESS, OPT_NEW_COMPRESS, OPT_NO_COMPRESS, OPT_OLD_ARGS,
        OPT_STOP_AFTER, OPT_STOP_AT,
        OPT_REFUSED_BASE = 9000};
-@@ -737,6 +737,7 @@ static struct poptOption long_options[] = {
+@@ -743,6 +743,7 @@ static struct poptOption long_options[] = {
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
@@ -96,7 +96,7 @@ diff --git a/options.c b/options.c
    {"fuzzy",           'y', POPT_ARG_NONE,   0, 'y', 0, 0 },
    {"no-fuzzy",         0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
    {"no-y",             0,  POPT_ARG_VAL,    &fuzzy_basis, 0, 0, 0 },
-@@ -993,6 +994,9 @@ static void set_refuse_options(void)
+@@ -1004,6 +1005,9 @@ static void set_refuse_options(void)
  #ifndef SUPPORT_HARD_LINKS
        parse_one_refuse_match(0, "link-dest", list_end);
  #endif
@@ -106,7 +106,7 @@ diff --git a/options.c b/options.c
  #ifndef HAVE_MKTIME
        parse_one_refuse_match(0, "stop-at", list_end);
  #endif
-@@ -1322,6 +1326,8 @@ char *alt_dest_opt(int type)
+@@ -1333,6 +1337,8 @@ char *alt_dest_opt(int type)
                return "--copy-dest";
        case LINK_DEST:
                return "--link-dest";
@@ -115,7 +115,7 @@ diff --git a/options.c b/options.c
        default:
                NOISY_DEATH("Unknown alt_dest_opt type");
        }
-@@ -1699,6 +1705,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1714,6 +1720,10 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        want_dest_type = LINK_DEST;
                        goto set_dest_dir;
  
@@ -129,7 +129,7 @@ diff --git a/options.c b/options.c
 diff --git a/rsync.1.md b/rsync.1.md
 --- a/rsync.1.md
 +++ b/rsync.1.md
-@@ -423,6 +423,7 @@ has its own detailed description later in this man page.
+@@ -510,6 +510,7 @@ has its own detailed description later in this manpage.
  --compare-dest=DIR       also compare destination files relative to DIR
  --copy-dest=DIR          ... and include copies of unchanged files
  --link-dest=DIR          hardlink to files in DIR when unchanged
@@ -137,7 +137,7 @@ diff --git a/rsync.1.md b/rsync.1.md
  --compress, -z           compress file data during the transfer
  --compress-choice=STR    choose the compression algorithm (aka --zc)
  --compress-level=NUM     explicitly set compression level (aka --zl)
-@@ -2498,6 +2499,18 @@ your home directory (remove the '=' for that).
+@@ -2720,6 +2721,18 @@ expand it.
      this bug by avoiding the `-o` option (or using `--no-o`) when sending to an
      old rsync.
  
@@ -159,7 +159,7 @@ diff --git a/rsync.1.md b/rsync.1.md
 diff --git a/rsync.h b/rsync.h
 --- a/rsync.h
 +++ b/rsync.h
-@@ -177,6 +177,11 @@
+@@ -175,6 +175,11 @@
  #define COMPARE_DEST 1
  #define COPY_DEST 2
  #define LINK_DEST 3
@@ -232,7 +232,7 @@ diff --git a/syscall.c b/syscall.c
 diff --git a/t_stub.c b/t_stub.c
 --- a/t_stub.c
 +++ b/t_stub.c
-@@ -39,6 +39,7 @@ size_t max_alloc = 0; /* max_alloc is needed when combined with util2.o */
+@@ -38,6 +38,7 @@ size_t max_alloc = 0; /* max_alloc is needed when combined with util2.o */
  char *partial_dir;
  char *module_dir;
  filter_rule_list daemon_filter_list;