When syncing my repo (which happens to be a git repo) over rsync to my other computers, emaint throws an error that the destination appears to be under revision control and then aborts. Reproducible: Always Steps to Reproduce: 1. Have ".git" directory in location that will be synced 2. emaint sync -r repo Actual Results: >>> Syncing repository 'gentoo' into '/var/portage'... !!! /var/portage appears to be under revision control (contains .git). !!! Aborting rsync sync. Action: sync for repo: gentoo, returned code = 1 Expected Results: emaint does what I tell it to do and synchronizes the repo
We can add a repos.conf setting for this. You'll need to have --exclude=/.git in your rsync excludes for this repo.
*** This bug has been marked as a duplicate of bug 296085 ***
(In reply to Zac Medico from comment #1) > We can add a repos.conf setting for this. You'll need to have > --exclude=/.git in your rsync excludes for this repo. What if I want to synchronize the .git directory as well? (So I can retain the git metainformation and e.g. use git log to find out the recent changes on an ebuild) My current use-case is to synchronize from git on one of my machines, and then use egencache to generate metadata there and then using that machine as an rsync server for my other machines (saving me from generating metadata on all my machines).
(In reply to gentoo-user from comment #3) > (In reply to Zac Medico from comment #1) > > We can add a repos.conf setting for this. You'll need to have > > --exclude=/.git in your rsync excludes for this repo. > > What if I want to synchronize the .git directory as well? (So I can retain > the git metainformation and e.g. use git log to find out the recent changes > on an ebuild) > My current use-case is to synchronize from git on one of my machines, and > then use egencache to generate metadata there and then using that machine as > an rsync server for my other machines (saving me from generating metadata on > all my machines). That will be fine, since the .git directory will not have special treatment when the repository is configured with an rsync URI. So, by default, the .git directory will be synced normally by rsync clients, giving them access to the git history. Of course, clients can add --exclude=/.git to the rsync options if they don't want the git history.