Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vendor.md: suggest doc clarification/caveat around rsync #64

Open
cemeyer opened this issue Dec 25, 2020 · 2 comments
Open

vendor.md: suggest doc clarification/caveat around rsync #64

cemeyer opened this issue Dec 25, 2020 · 2 comments

Comments

@cemeyer
Copy link

cemeyer commented Dec 25, 2020

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¢.)

@DimitryAndric
Copy link

DimitryAndric commented Jan 2, 2021

You can just use rsync -va --del --exclude .git. It will simply ignore .git directories in the source and destination.

@cemeyer
Copy link
Author

cemeyer commented Jan 3, 2021

Ok, let's document that (assuming it works).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants