php-censor icon indicating copy to clipboard operation
php-censor copied to clipboard

feature: allow to use local repo copy while cloning

Open SimonHeimberg opened this issue 8 years ago • 5 comments

When there is a local repo copy, we could reduce bandwidth usage with it: git clone --reference for newer git (somewhen after 2.7.4) the fillowing option only generates a warning when the repo is missing: git clone --reference-if-able

Compared to --depth, this has the advantage of full history.

As other clone options (like --depth), this is a local config.

We could also keep the last copy of the repo. Then use --dissociate as option, because this copies the git objects.

For other vcs providers (hg, ...) this could be implemented by first cloning locally, then pulling from remote.

SimonHeimberg avatar Aug 24 '17 21:08 SimonHeimberg

@SimonHeimberg Thanks!

corpsee avatar Aug 25 '17 01:08 corpsee

https://github.com/Block8/PHPCI/pull/838

corpsee avatar Aug 25 '17 01:08 corpsee

implementation mentioned above https://github.com/php-censor/php-censor/issues/114#issuecomment-324801286 handles the mirror repo automatically

  • Maintaining a mirror is another possibility of course. This requires managing this mirror repo (create, pull into, delete when project deleted, ...).
  • My original idea was to use a local repo which is around anyway, and to not pull into this one. This is probably not very useful when running several workers. (How is build output like coverage report referenced then anyway?)
  • My 2nd idea is to always keep the latest build directory and use this as pull reference. (The number of builds to keep could be configurable.)

SimonHeimberg avatar Oct 12 '18 16:10 SimonHeimberg

@SimonHeimberg Thank you for the detailed explanation.

corpsee avatar Oct 12 '18 18:10 corpsee