diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-17 09:33:58 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-07-17 09:33:58 +0200 |
commit | cbdb2584da59ec068e0d21e3e61028e54d1726fc (patch) | |
tree | d26557fbf9e01e704794f38de9b5a3fe67b830b8 /options.go | |
parent | 6b3a6df29920d39b8308924b3b84178226b56224 (diff) | |
download | go-git-cbdb2584da59ec068e0d21e3e61028e54d1726fc.tar.gz |
remote: fetch, correct behaviour on tags
Diffstat (limited to 'options.go')
-rw-r--r-- | options.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -103,6 +103,18 @@ func (o *PullOptions) Validate() error { return nil } +type TagFetchMode int + +var ( + // TagFollowing any tag that points into the histories being fetched is also + // fetched. TagFollowing requires a server with `include-tag` capability + // in order to fetch the annotated tags objects. + TagFollowing TagFetchMode = 0 + // AllTags fetch all tags from the remote (i.e., fetch remote tags + // refs/tags/* into local tags with the same name) + AllTags TagFetchMode = 1 +) + // FetchOptions describes how a fetch should be performed type FetchOptions struct { // Name of the remote to fetch from. Defaults to origin. @@ -117,6 +129,9 @@ type FetchOptions struct { // stored, if nil nothing is stored and the capability (if supported) // no-progress, is sent to the server to avoid send this information. Progress sideband.Progress + // Tags describe how the tags will be fetched from the remote repository, + // by default is TagFollowing. + Tags TagFetchMode } // Validate validates the fields and sets the default values. |