Age | Commit message (Collapse) | Author |
|
If the repository was updated, write the description into the
`description` file.
Add a `github::Repo.description()` method to get an empty string if the
description is `None`. This facilitates writing to the `description`
file.
|
|
Looks like I'm not going to be using this, since the functions in this
match arm that take `database::Repo`s should take the one based on the
`github::Repo` rather than the one fetched from the database.
|
|
|
|
Separate source and fork repositories into different paths.
|
|
|
|
I wanted to move `clone_path` into `mirror()` so I could make a
different clone path for forks.
|
|
Copy the repository description from GitHub into the clone repo.
|
|
If we haven't encountered a repository yet, mirror it to the filesystem.
Change `From<github::Repo>` to `From<&github::Repo>` so we don't consume
the repo and can use it later in the repo list loop.
|
|
|
|
|
|
If the repo was updated since we last cached it, update the `updated_at`
column to the new value so we know that we fetched the latest.
|
|
Find out if the latest copy is more recent than the cached value in our
database.
|
|
|
|
Will be using this to implement the main logic.
|
|
|
|
Set up the database with a table for repositories so we can cache when
they were last updated.
|
|
|
|
Should work like:
$ git remote update
From what I can tell from:
https://github.com/git/git/blob/a0dda6023ed82b927fa205c474654699a5b07a82/builtin/remote.c#L1452-L1490
this translates to something like:
$ git fetch --prune --multiple default --all
|
|
Move hard-coded repository values to function arguments.
|
|
Based on the guide here:
https://libgit2.org/docs/guides/101-samples/#repositories_clone_mirror
References:
https://github.com/libgit2/libgit2sharp/issues/577
https://github.com/libgit2/libgit2.github.io/pull/31
|
|
|
|
|
|
|
|
|
|
|