Prevent git hardlinks when cloning locally
Review Request #10172 — Created Sept. 22, 2018 and submitted
When a ReviewBot RepositoryTool clones, it runs
git clonewith the
--localflag, which among other things, saves space by using
repository.pyattempts to clone into
is often a ramdisk, it's considered a separate device. Hardlinks don't
support this, so the tool fails to run with:
fatal: failed to create link <path> Invalid cross-device link
This patch adds
--no-hardlinksto the clone which allows us to still
/tmp, but it doesn't fail on local repositories.
I've tested this by adding a new review request after patching which
correctly clones and runs my own reviewbot plugin.