Bug 14916 - --times act like a skip switch if --compare-dest is used
Summary: --times act like a skip switch if --compare-dest is used
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-22 11:59 UTC by Marc Gutt
Modified: 2021-11-22 11:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Gutt 2021-11-22 11:59:43 UTC
I created the following dirs and files:
###################################################################
mkdir /tmp/src
mkdir /tmp/dst
mkdir /tmp/comp
touch /tmp/src/test
touch /tmp/comp/test
###################################################################


Now, "test" has the same checksum, but different modification time. I use "--checksum" to ignore modification times and it works as expected:
###################################################################
rsync --recursive --links --perms --times --group --owner --devices --specials --verbose --checksum --dry-run /tmp/src/ /tmp/comp
sending incremental file list
./

sent 79 bytes  received 22 bytes  202.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


But it does not if I use "--compare-dest":
###################################################################
rsync --recursive --links --perms --times --group --owner --devices --specials --verbose --checksum --dry-run --compare-dest=/tmp/comp /tmp/src/ /tmp/dst
sending incremental file list
./
test

sent 83 bytes  received 22 bytes  210.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


This works only, if I disable copying the modification times by removing "--times":
###################################################################
rsync --recursive --links --perms --group --owner --devices --specials --verbose --checksum --dry-run --compare-dest=/tmp/comp /tmp/src/ /tmp/dst
sending incremental file list

sent 73 bytes  received 12 bytes  170.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
###################################################################


This means "--times" acts like a skip switch if "--compare-dest" is used, which I think is wrong.