The patches for 3.2.5.
[rsync-patches.git] / detect-renamed.diff
index 8e88aa3f981f7e1a69ee0d12eb91d2818d697353..c9ad751dce1eea1592c3b1e32f1a22714c25d128 100644 (file)
@@ -38,7 +38,7 @@ TODO:
   a file that can't use it, while missing out on giving it to a file
   that could use it.
 
-based-on: 3e44bbd3132c22f7ce1ae48c0ce262f237473038
+based-on: 5fcf20ee9d8abf7aae8578354f82c6f500822e06
 diff --git a/backup.c b/backup.c
 --- a/backup.c
 +++ b/backup.c
@@ -132,7 +132,7 @@ diff --git a/delete.c b/delete.c
 diff --git a/flist.c b/flist.c
 --- a/flist.c
 +++ b/flist.c
-@@ -64,6 +64,7 @@ extern int non_perishable_cnt;
+@@ -65,6 +65,7 @@ extern int non_perishable_cnt;
  extern int prune_empty_dirs;
  extern int copy_links;
  extern int copy_unsafe_links;
@@ -140,7 +140,7 @@ diff --git a/flist.c b/flist.c
  extern int protocol_version;
  extern int sanitize_paths;
  extern int munge_symlinks;
-@@ -130,6 +131,8 @@ static int64 tmp_dev = -1, tmp_ino;
+@@ -131,6 +132,8 @@ static int64 tmp_dev = -1, tmp_ino;
  #endif
  static char tmp_sum[MAX_DIGEST_LEN];
  
@@ -149,7 +149,7 @@ diff --git a/flist.c b/flist.c
  static char empty_sum[MAX_DIGEST_LEN];
  static int flist_count_offset; /* for --delete --progress */
  static int show_filelist_progress;
-@@ -277,6 +280,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
+@@ -278,6 +281,45 @@ static inline int is_excluded(const char *fname, int is_dir, int filter_level)
        return name_is_excluded(fname, is_dir ? NAME_IS_DIR : NAME_IS_FILE, filter_level);
  }
  
@@ -195,7 +195,7 @@ diff --git a/flist.c b/flist.c
  static void send_directory(int f, struct file_list *flist,
                           char *fbuf, int len, int flags);
  
-@@ -2682,6 +2724,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
+@@ -2720,6 +2762,23 @@ struct file_list *recv_file_list(int f, int dir_ndx)
         * for a non-relative transfer in recv_file_entry(). */
        flist_sort_and_clean(flist, relative_paths);
  
@@ -532,7 +532,7 @@ diff --git a/generator.c b/generator.c
                rsyserr(FERROR_XFER, stat_errno, "recv_generator: failed to stat %s",
                        full_fname(fname));
                goto cleanup;
-@@ -2251,6 +2402,12 @@ void generate_files(int f_out, const char *local_name)
+@@ -2253,6 +2404,12 @@ void generate_files(int f_out, const char *local_name)
        if (DEBUG_GTE(GENR, 1))
                rprintf(FINFO, "generator starting pid=%d\n", (int)getpid());
  
@@ -545,7 +545,7 @@ diff --git a/generator.c b/generator.c
        if (delete_before && !solo_file && cur_flist->used > 0)
                do_delete_pass();
        if (delete_during == 2) {
-@@ -2259,7 +2416,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2261,7 +2418,7 @@ void generate_files(int f_out, const char *local_name)
        }
        info_levels[INFO_FLIST] = info_levels[INFO_PROGRESS] = 0;
  
@@ -554,7 +554,7 @@ diff --git a/generator.c b/generator.c
                whole_file = 0;
        if (DEBUG_GTE(FLIST, 1)) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -2295,7 +2452,7 @@ void generate_files(int f_out, const char *local_name)
+@@ -2297,7 +2454,7 @@ void generate_files(int f_out, const char *local_name)
                                                dirdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
                                        } else
                                                dirdev = MAKEDEV(0, 0);
@@ -563,7 +563,7 @@ diff --git a/generator.c b/generator.c
                                } else
                                        change_local_filter_dir(fbuf, strlen(fbuf), F_DEPTH(fp));
                        }
-@@ -2342,7 +2499,21 @@ void generate_files(int f_out, const char *local_name)
+@@ -2344,7 +2501,21 @@ void generate_files(int f_out, const char *local_name)
        } while ((cur_flist = cur_flist->next) != NULL);
  
        if (delete_during)
@@ -589,7 +589,7 @@ diff --git a/generator.c b/generator.c
 diff --git a/main.c b/main.c
 --- a/main.c
 +++ b/main.c
-@@ -718,7 +718,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
+@@ -715,7 +715,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
  
        if (mkpath_dest_arg && statret < 0 && (cp || file_total > 1)) {
                int save_errno = errno;
@@ -601,7 +601,7 @@ diff --git a/main.c b/main.c
 diff --git a/options.c b/options.c
 --- a/options.c
 +++ b/options.c
-@@ -87,6 +87,7 @@ int am_server = 0;
+@@ -91,6 +91,7 @@ int am_server = 0;
  int am_sender = 0;
  int am_starting_up = 1;
  int relative_paths = -1;
@@ -609,7 +609,7 @@ diff --git a/options.c b/options.c
  int implied_dirs = 1;
  int missing_args = 0; /* 0 = FERROR_XFER, 1 = ignore, 2 = delete */
  int numeric_ids = 0;
-@@ -736,6 +737,7 @@ static struct poptOption long_options[] = {
+@@ -742,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 },
@@ -617,7 +617,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 },
-@@ -2346,7 +2348,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2379,7 +2381,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                inplace = 1;
        }
  
@@ -626,7 +626,7 @@ diff --git a/options.c b/options.c
                partial_dir = tmp_partialdir;
  
        if (inplace) {
-@@ -2355,6 +2357,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2388,6 +2390,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        snprintf(err_buf, sizeof err_buf,
                                 "--%s cannot be used with --%s\n",
                                 append_mode ? "append" : "inplace",
@@ -634,7 +634,7 @@ diff --git a/options.c b/options.c
                                 delay_updates ? "delay-updates" : "partial-dir");
                        return 0;
                }
-@@ -2721,6 +2724,8 @@ void server_options(char **args, int *argc_p)
+@@ -2809,6 +2812,8 @@ void server_options(char **args, int *argc_p)
                        args[ac++] = "--super";
                if (size_only)
                        args[ac++] = "--size-only";
@@ -658,7 +658,7 @@ diff --git a/receiver.c b/receiver.c
 diff --git a/rsync.1.md b/rsync.1.md
 --- a/rsync.1.md
 +++ b/rsync.1.md
-@@ -421,6 +421,7 @@ detailed description below for a complete description.
+@@ -446,6 +446,7 @@ has its own detailed description later in this manpage.
  --modify-window=NUM, -@  set the accuracy for mod-time comparisons
  --temp-dir=DIR, -T       create temporary files in directory DIR
  --fuzzy, -y              find similar file for basis if no dest file
@@ -666,9 +666,9 @@ diff --git a/rsync.1.md b/rsync.1.md
  --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
-@@ -2297,6 +2298,22 @@ your home directory (remove the '=' for that).
-     fuzzy-match files, so either use `--delete-after` or specify some filename
-     exclusions if you need to prevent this.
+@@ -2539,6 +2540,22 @@ expand it.
+     potential fuzzy-match files, so either use [`--delete-after`](#opt) or
+     specify some filename exclusions if you need to prevent this.
  
 +0.  `--detect-renamed`
 +
@@ -682,9 +682,9 @@ diff --git a/rsync.1.md b/rsync.1.md
 +
 +    By default, alternate-basis files are hard-linked into a directory named
 +    ".~tmp~" in each file's destination directory, but if you've specified the
-+    `--partial-dir` option, that directory will be used instead.  These
++    [`--partial-dir`](#opt) option, that directory will be used instead.  These
 +    otential alternate-basis files will be removed as the transfer progresses.
-+    This option conflicts with `--inplace` and `--append`.
++    This option conflicts with [`--inplace`](#opt) and [`--append`](#opt).
 +
  0.  `--compare-dest=DIR`
  
@@ -692,7 +692,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
-@@ -288,7 +288,7 @@ enum filetype {
+@@ -286,7 +286,7 @@ enum filetype {
  #define NDX_DEL_STATS -3
  #define NDX_FLIST_OFFSET -101
  
@@ -701,7 +701,7 @@ diff --git a/rsync.h b/rsync.h
  #define DEL_NO_UID_WRITE      (1<<0) /* file/dir has our uid w/o write perm */
  #define DEL_RECURSE           (1<<1) /* if dir, delete all contents */
  #define DEL_DIR_IS_EMPTY      (1<<2) /* internal delete_FUNCTIONS use only */
-@@ -298,6 +298,7 @@ enum filetype {
+@@ -296,6 +296,7 @@ enum filetype {
  #define DEL_FOR_DEVICE                (1<<6) /* making room for a replacement device */
  #define DEL_FOR_SPECIAL       (1<<7) /* making room for a replacement special */
  #define DEL_FOR_BACKUP                (1<<8) /* the delete is for a backup operation */
@@ -739,7 +739,7 @@ diff --git a/util1.c b/util1.c
                        ret = -ret - 1;
                else
                        ret++;
-@@ -1176,6 +1176,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
+@@ -1197,6 +1197,32 @@ char *normalize_path(char *path, BOOL force_newbuf, unsigned int *len_ptr)
        return path;
  }
  
@@ -772,7 +772,7 @@ diff --git a/util1.c b/util1.c
  /**
   * Return a quoted string with the full pathname of the indicated filename.
   * The string " (in MODNAME)" may also be appended.  The returned pointer
-@@ -1269,7 +1295,7 @@ int handle_partial_dir(const char *fname, int create)
+@@ -1290,7 +1316,7 @@ int handle_partial_dir(const char *fname, int create)
                        }
                        statret = -1;
                }