Bug 10448 - Finish implementing the --ignore-case feature
Finish implementing the --ignore-case feature
Status: ASSIGNED
Product: rsync
Classification: Unclassified
Component: core
3.1.1
All All
: P5 enhancement
: ---
Assigned To: Wayne Davison
Rsync QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-14 22:20 UTC by Haravikk
Modified: 2015-07-16 13:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haravikk 2014-02-14 22:20:05 UTC
I'm not sure why --ignore-case isn't provided as a standard flag for current versions of rsync, but I think it should be included as it's incredibly useful, especially since Windows and OS X systems both default to case insensitive while Linux tends to have case-insensitive file systems a lot more often, plus it's possible for all free to to have any combination of sensitivity and insensitivity which can be a nightmare to manage properly.

Anyway, I'd like to recommend that --ignore-case be provided by default in a future release. I'd even go a step further and recommend providing a soft-error if rsync detects that it is syncing from a case sensitive system to a case-insensitive one or vice-versa so that users are warned of any potential issues with files or even directories that may end being overwritten, or copied again and again.
Comment 1 Wayne Davison 2014-02-24 19:20:44 UTC
The current patch is only a partial implementation of the feature, so it is not yet ready for merging into the main code.
Comment 2 John Pierman 2015-07-16 13:44:37 UTC
tested with 3.07 and 3.1 with --ignore-case patch applied

cd /tmp
mkdir -p a/b/c/d/e/f
mkdir -p A/b/C/D/e/F
add some files to a/b/c/d/e/f/
rsync -r --ignore-case a/ A/
>> creates b/c/d/e/f/<files>

Why is it not ignoring case?  I expect it to add all files in 'f' to 'F'
Comment 3 John Pierman 2015-07-16 13:44:51 UTC
Because you're not running it on a case-ignoring filesystem.  That patch is (sadly) only a partially effective set of changes that helps rsync to deal with a filesystem that doesn't differentiate upper-/lower-case when naming files.  Rsync's main algorithm of probing for files by name (via stat) didn't change, and thus it doesn't try to find an alternate name for the same file if the filesystem isn't conglomerating them together (and indeed, it totally fails to notice if the case on a filename has changed on the server compared to the file's name on the receiver).

For a means of fixing this, I'm imaging having the code that is used for --delete-during getting modified to notice changes in case and trying to fix them (even if rsync isn't doing a delete-during run).  If that were done, the patch would probably then be in good enough shape to finally be included in the main code.