freebsd-git-docs
freebsd-git-docs copied to clipboard
vendor.md: suggest doc clarification/caveat around rsync
Thanks for drafting these documents; in general, the vendoring process has been more straightforward than our previous SVN system.
One caveat I'd call out is the rsync -va --del ~/git/NetBSD/usr.sbin/mtree/ .
at Update the Sources in the Vendor Branch.
The rsync --del
will nuke the worktree's .git
file in the vendor worktree. To work around this, save a copy of the .git
file in the parent directory before rsync and restore it afterwards. This is ugly, but if you tell rsync to ignore .git
instead, it will delete the file as not-present in the source directory. Maybe someone more familiar with rsync has an incantation to avoid clobbering worktrees.
(As a personal preference: the rsync -v
(verbose) flag is just spam for any vendor software with a significant number of files. git status
will tell you what changed, and that's more important. My 2¢.)
You can just use rsync -va --del --exclude .git
. It will simply ignore .git
directories in the source and destination.
Ok, let's document that (assuming it works).