You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the git man pages, git clone have an option --mirror specifically made for this. And the same section mention using git remote update to sync the mirror (which can be run with --prune).
Therefore, we should probably switch to git clone --mirror and git remote update --prune and drop the customs refs. That way, we should safely assume that the repository are a complete mirror of the source repository.
The text was updated successfully, but these errors were encountered:
If we look at the source, the repo are cloned using only the
--bare
option, and updated usingfetch --all --prune
and using customs refs.https://github.com/eXolnet/redmine_git_mirror/blob/master/lib/redmine_git_mirror/git.rb#L45
https://github.com/eXolnet/redmine_git_mirror/blob/master/lib/redmine_git_mirror/git.rb#L64
https://github.com/eXolnet/redmine_git_mirror/blob/master/lib/redmine_git_mirror/git.rb#L52-L57
https://github.com/eXolnet/redmine_git_mirror/blob/master/lib/redmine_git_mirror/git.rb#L79-L101
Looking at the git man pages,
git clone
have an option--mirror
specifically made for this. And the same section mention usinggit remote update
to sync the mirror (which can be run with--prune
).https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---mirror
Looking at this answer,
git remote update
seems more appropriate overgit fetch
to sync a mirror.https://stackoverflow.com/a/17712553
Therefore, we should probably switch to
git clone --mirror
andgit remote update --prune
and drop the customs refs. That way, we should safely assume that the repository are a complete mirror of the source repository.The text was updated successfully, but these errors were encountered: