Bug 6120 - Default exclude file
Summary: Default exclude file
Status: RESOLVED WONTFIX
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.5
Hardware: Other Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-17 15:03 UTC by wooptoo
Modified: 2009-03-13 12:25 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 wooptoo 2009-02-17 15:03:43 UTC
rsync already has a mechanism for reading exclude patterns from a file, using the --exclude-from option, but it would be useful to read them from a *default* file if --exclude-from is omitted.
Something like .gitignore from git.

It could work something like:
1. place .rsyncignore in SRC/ with a list of excluded files/folders
2. rsync -av SRC DEST (without the need to specify --exclude-from, it would automatically use .rsyncignore)
Comment 1 Skee 2009-02-17 15:09:59 UTC
alias rsync=rsync --exclude-from=.rsyncignore
Comment 2 Wayne Davison 2009-03-13 12:25:27 UTC
I also think this is better left to local customization.  See the -F option that causes rsync to use this filter command:  --filter=’dir-merge /.rsync-filter’

If you want that by default, either setup an alias, a wrapper shell script, or use a popt alias.  For instance, you could make the -a option include -F by putting this in your ~/.popt (or /etc/popt) file:

rsync alias -a -aF