diff options
author | Wayne Davison <wayned@samba.org> | 2005-01-17 23:11:13 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2005-01-17 23:11:13 +0000 |
commit | a36ffd39109cd910a5102e83333d77641c1e6227 (patch) | |
tree | f76d6c0d92d64ad5259e2caa557247e0eeb13afc /match.c | |
parent | 17b5b32f75d4d00e00ff2664ca905c797f455bb1 (diff) | |
download | rsync-a36ffd39109cd910a5102e83333d77641c1e6227.tar.gz rsync-a36ffd39109cd910a5102e83333d77641c1e6227.tar.bz2 rsync-a36ffd39109cd910a5102e83333d77641c1e6227.zip |
Changed the checks for --inplace to use the new updating_basis_file
variable.
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -23,8 +23,8 @@ extern int verbose; extern int am_server; extern int do_progress; extern int checksum_seed; -extern int inplace; -extern int make_backups; + +int updating_basis_file; typedef unsigned short tag; @@ -206,9 +206,9 @@ static void hash_search(int f,struct sum_struct *s, if (l != s->sums[i].len) continue; - /* inplace: ensure chunk's offset is either >= our + /* in-place: ensure chunk's offset is either >= our * offset or that the data didn't move. */ - if (inplace && !make_backups && s->sums[i].offset < offset + if (updating_basis_file && s->sums[i].offset < offset && !(s->sums[i].flags & SUMFLG_SAME_OFFSET)) continue; @@ -227,10 +227,10 @@ static void hash_search(int f,struct sum_struct *s, continue; } - /* If inplace is enabled, the best possible match is + /* When updating in-place, the best possible match is * one with an identical offset, so we prefer that over * the following want_i optimization. */ - if (inplace && !make_backups) { + if (updating_basis_file) { do { size_t i2 = targets[j].i; if (s->sums[i2].offset != offset) @@ -253,7 +253,7 @@ static void hash_search(int f,struct sum_struct *s, /* we've found a match, but now check to see * if want_i can hint at a better match. */ if (i != want_i && want_i < s->count - && (!inplace || make_backups || s->sums[want_i].offset >= offset + && (!updating_basis_file || s->sums[want_i].offset >= offset || s->sums[want_i].flags & SUMFLG_SAME_OFFSET) && sum == s->sums[want_i].sum1 && memcmp(sum2, s->sums[want_i].sum2, s->s2length) == 0) { |