diff options
author | Paulo Gomes <pjbgf@linux.com> | 2023-04-17 23:05:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 23:05:06 +0100 |
commit | 0a1c5ab118998a22ef88d8e6c42970197d77413c (patch) | |
tree | 68ee12567f4ab297639e31fe1ebcf666a77c5531 /options.go | |
parent | 7cd387bd28a95590d9536b4344d4ff60b75d6590 (diff) | |
parent | 9a5b08f5c32bad31a35a53c045ebf6c8409f8b2c (diff) | |
download | go-git-0a1c5ab118998a22ef88d8e6c42970197d77413c.tar.gz |
Merge pull request #735 from aymanbagabas/clone-mirror
git: add mirror clone option
Diffstat (limited to 'options.go')
-rw-r--r-- | options.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -46,6 +46,14 @@ type CloneOptions struct { ReferenceName plumbing.ReferenceName // Fetch only ReferenceName if true. SingleBranch bool + // Mirror clones the repository as a mirror. + // + // Compared to a bare clone, mirror not only maps local branches of the + // source to local branches of the target, it maps all refs (including + // remote-tracking branches, notes etc.) and sets up a refspec configuration + // such that all these refs are overwritten by a git remote update in the + // target repository. + Mirror bool // No checkout of HEAD after clone if true. NoCheckout bool // Limit fetching to the specified number of commits. |