aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorJulien Salleyron <julien.salleyron@gmail.com>2021-08-20 10:02:09 +0200
committerJulien Salleyron <julien.salleyron@gmail.com>2024-02-22 11:28:46 +0100
commit577ec1f3aee1c02ac611cdfe02f89bfaa3840e4f (patch)
tree5a1676030ef2fc64eb164243a6de361d3429e3f0 /options.go
parent686a0f7a492894fc3efd67e8be99a4240b9b65ec (diff)
downloadgo-git-577ec1f3aee1c02ac611cdfe02f89bfaa3840e4f.tar.gz
*: fetch, adds the prune option. Fixes #316
Co-authored-by: Ludovic Fernandez <ldez@users.noreply.github.com>
Diffstat (limited to 'options.go')
-rw-r--r--options.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/options.go b/options.go
index 4f913dc..635a883 100644
--- a/options.go
+++ b/options.go
@@ -166,7 +166,7 @@ const (
// AllTags fetch all tags from the remote (i.e., fetch remote tags
// refs/tags/* into local tags with the same name)
AllTags
- //NoTags fetch no tags from the remote at all
+ // NoTags fetch no tags from the remote at all
NoTags
)
@@ -198,6 +198,9 @@ type FetchOptions struct {
CABundle []byte
// ProxyOptions provides info required for connecting to a proxy.
ProxyOptions transport.ProxyOptions
+ // Prune specify that local refs that match given RefSpecs and that do
+ // not exist remotely will be removed.
+ Prune bool
}
// Validate validates the fields and sets the default values.