From: Wayne Davison Date: Mon, 9 Oct 2006 02:59:23 +0000 (+0000) Subject: If the combination of --dry-run, --link-dest, and -H finds a matching X-Git-Tag: v2.6.9pre1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9163a4cf516682e5109457d09ce68c53be26f91;p=thirdparty%2Frsync.git If the combination of --dry-run, --link-dest, and -H finds a matching file in on of the extra basis dirs, make a note of which basis dir we would have used in the hard-link with the destination file. --- diff --git a/generator.c b/generator.c index b36bc4d2..15cd325e 100644 --- a/generator.c +++ b/generator.c @@ -657,8 +657,11 @@ static int try_dests_reg(struct file_struct *file, char *fname, int ndx, itemizing && verbose > 1, code) < 0) goto try_a_copy; - if (preserve_hard_links && file->link_u.links) + if (preserve_hard_links && file->link_u.links) { + if (dry_run) + file->link_u.links->link_dest_used = j + 1; hard_link_cluster(file, ndx, itemizing, code); + } } else #endif if (itemizing)