Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Only clone GitHub Pages repo if not already cloned #189

Closed
mojavelinux opened this issue Jun 29, 2016 · 3 comments
Closed

Only clone GitHub Pages repo if not already cloned #189

mojavelinux opened this issue Jun 29, 2016 · 3 comments
Milestone

Comments

@mojavelinux
Copy link
Contributor

For some sites, the GitHub Pages repository is large and takes considerable time to clone (on top of the time it takes to first delete it from disk). Currently, the prepareGhPages task removes the existing folder, then clones the repository anew each time. It would save a lot of time if this plugin only cloned the repository if not already cloned.

Ideally, the prepareGhPages task would check to see if the workingDir already exists and is a git repository. If both of those are true, the task would merely fetch updates.

@mojavelinux
Copy link
Contributor Author

I want to add that this also leaves room for the repository to be cloned by a separate process (perhaps as part of a build pipeline).

@ajoberstar
Copy link
Owner

This makes sense. Didn't do it before out of simplicity, but it's a good idea.

@ajoberstar ajoberstar added this to the 1.6.0 milestone Jun 30, 2016
@mojavelinux
Copy link
Contributor Author

I'll try to give this one a shot. I suspect we'll have some code review iterations as we try to decide the best approach. One thing is for sure. This should save the turnaround time for back-to-back deployments (since most CI tools have the ability to cache workspaces).

mojavelinux added a commit to mojavelinux/gradle-git that referenced this issue Jul 2, 2016
- reuse existing clone if available & matches configuration
- fetch and hard reset clone before using
- only create orphan branch for fresh clone
- set/use ext.repo more efficiently
mojavelinux added a commit to mojavelinux/gradle-git that referenced this issue Jul 3, 2016
- reuse existing clone if available & matches configuration
- clean, fetch and hard reset clone before using
- only create orphan branch for fresh clone
- set/use ext.repo more efficiently
mojavelinux added a commit to mojavelinux/gradle-git that referenced this issue Jul 3, 2016
- reuse existing clone if available & matches configuration
- clean, fetch and hard reset clone before using
- only create orphan branch for fresh clone
- set/use ext.repo more efficiently
ajoberstar added a commit that referenced this issue Jul 16, 2016
resolves #189 reuse existing clone if available
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants