Can the gitoxide library do the equivalent of git clone --mirror REPO
?
#738
-
Gitoxide is used for walking Git repository objects in Nosey Parker, a fast detector of hardcoded secrets. I'm adding functionality to Nosey Parker to be able to scan for secrets in a Git repository without first manually cloning it; instead, just specifying the URL will be enough. In this secrets detection use case, it's preferable to clone Git repositories with the The code in Nosey Parker is currently shelling out to the Can the gitoxide library do the equivalent of Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
At this time
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 |
Beta Was this translation helpful? Give feedback.
At this time
mirror
isn't directly supported. After short investigation, it would mean the following to implement it.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…