Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
a36ffd39
Commit
a36ffd39
authored
Jan 17, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the checks for --inplace to use the new updating_basis_file
variable.
parent
17b5b32f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
match.c
match.c
+7
-7
No files found.
match.c
View file @
a36ffd39
...
@@ -23,8 +23,8 @@ extern int verbose;
...
@@ -23,8 +23,8 @@ extern int verbose;
extern
int
am_server
;
extern
int
am_server
;
extern
int
do_progress
;
extern
int
do_progress
;
extern
int
checksum_seed
;
extern
int
checksum_seed
;
extern
int
inplace
;
extern
int
make_backups
;
int
updating_basis_file
;
typedef
unsigned
short
tag
;
typedef
unsigned
short
tag
;
...
@@ -206,9 +206,9 @@ static void hash_search(int f,struct sum_struct *s,
...
@@ -206,9 +206,9 @@ static void hash_search(int f,struct sum_struct *s,
if
(
l
!=
s
->
sums
[
i
].
len
)
if
(
l
!=
s
->
sums
[
i
].
len
)
continue
;
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. */
* 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
))
&&
!
(
s
->
sums
[
i
].
flags
&
SUMFLG_SAME_OFFSET
))
continue
;
continue
;
...
@@ -227,10 +227,10 @@ static void hash_search(int f,struct sum_struct *s,
...
@@ -227,10 +227,10 @@ static void hash_search(int f,struct sum_struct *s,
continue
;
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
* one with an identical offset, so we prefer that over
* the following want_i optimization. */
* the following want_i optimization. */
if
(
inplace
&&
!
make_backups
)
{
if
(
updating_basis_file
)
{
do
{
do
{
size_t
i2
=
targets
[
j
].
i
;
size_t
i2
=
targets
[
j
].
i
;
if
(
s
->
sums
[
i2
].
offset
!=
offset
)
if
(
s
->
sums
[
i2
].
offset
!=
offset
)
...
@@ -253,7 +253,7 @@ static void hash_search(int f,struct sum_struct *s,
...
@@ -253,7 +253,7 @@ static void hash_search(int f,struct sum_struct *s,
/* we've found a match, but now check to see
/* we've found a match, but now check to see
* if want_i can hint at a better match. */
* if want_i can hint at a better match. */
if
(
i
!=
want_i
&&
want_i
<
s
->
count
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
)
||
s
->
sums
[
want_i
].
flags
&
SUMFLG_SAME_OFFSET
)
&&
sum
==
s
->
sums
[
want_i
].
sum1
&&
sum
==
s
->
sums
[
want_i
].
sum1
&&
memcmp
(
sum2
,
s
->
sums
[
want_i
].
sum2
,
s
->
s2length
)
==
0
)
{
&&
memcmp
(
sum2
,
s
->
sums
[
want_i
].
sum2
,
s
->
s2length
)
==
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment