Try: + *.git/ + *.git/.git/*** - *.git/* (you probably want to add --prune-empty-dirs)
Also, when debugging filters/excludes use -vv as it will tell you which
pattern is causing it to do what.
Also, there is no point in using -v without --itemize-changes.
On 05/03/2016 04:07 PM, Christoph Biedl wrote:
> Hello,
>
> Since the very first day I've been using rsync - some 15 years ago -
> the filtering rules caused great grieve. Their behaviour is just not
> the way I'd expect it be be and as I read the manpage. Usually I end
> up with some hand-written recipes, carefully documented,y including all
> the gotchas.
>
> This time however I failed and I see no other way than to ask for
> advice.
>
> Given the following structure
>
> project/
> .rsync-filter
> project.git/
> .git/
>
> Now, the following command (rsync 3.1.1)
>
> rsync -av --del --deleted-excluded -F \
> /path/to/project/ /path/to/backup/project/
>
> should transfer
>
> - sync: project/project.git/.git/
> - skip: Everything else in project/project.git/
> - sync: Everything else in project/
>
> In other words: Don't transfer the git repo except for .git/ itself.
> Yes, this means files not checked in are lost, that's by intention.
>
> Now, how is .rsync-filter supposed to look? The first of many failing
> attempts was
>
> + *.git/.git/*
> - *.git/
>
> This however kills the entire project.git/ directory, in violation of
> "the first matching pattern is acted on". Given previous bad
> experiences I've tried (using a script) all 128 combination of
>
> - line order
> - '+' or '-' at the start of any line
> - '*' appended to any line, or not, with without trailing slash
>
> but no avail.
>
> Any clue?
>
> Christoph
>
--
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. [email protected] (work)
Orlando, Florida [email protected] (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
signature.asc
Description: OpenPGP digital signature
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
