Skip to content

Can the gitoxide library do the equivalent of git clone --mirror REPO? #738

Answered by Byron
bradlarsen asked this question in Q&A
Discussion options

You must be logged in to vote

At this time mirror isn't directly supported. After short investigation, it would mean the following to implement it.

  1. fetch every ref there is on the remote
  2. set the remote.origin.mirror key to true in the remote configuration to make pushes behave like a mirror (and probably push everything each time), and fetch all refs in all future fetches.

For clones one would be able to configure the ref-specs prior to the clone to capture all refs advertised by the remote, and for fetches one could do the same, even on the caller side. If you were inclined to implemented on your end, then I believe that would already work. I have also put it into the roadmap (search for --mirror) for eventual impl…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bradlarsen
Comment options

Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants