aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-05-03 10:46:39 +0100
committerGitHub <noreply@github.com>2023-05-03 10:46:39 +0100
commit02856b824a05c18118c116af5b0e2bca1b3496b3 (patch)
tree86f0f043a8176a790c132d2862f8f3f4565c398e /options.go
parent0542a302c2be7ed7de276411f7e20b87309734b9 (diff)
parent19b39e150071832541f2cdcb669446a8609f57e7 (diff)
downloadgo-git-02856b824a05c18118c116af5b0e2bca1b3496b3.tar.gz
Merge pull request #750 from pjbgf/peel
git: Add support to ls-remote with peeled references. Fixes #749
Diffstat (limited to 'options.go')
-rw-r--r--options.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/options.go b/options.go
index e79cf9d..04c83de 100644
--- a/options.go
+++ b/options.go
@@ -624,8 +624,28 @@ type ListOptions struct {
InsecureSkipTLS bool
// CABundle specify additional ca bundle with system cert pool
CABundle []byte
+
+ // PeelingOption defines how peeled objects are handled during a
+ // remote list.
+ PeelingOption PeelingOption
}
+// PeelingOption represents the different ways to handle peeled references.
+//
+// Peeled references represent the underlying object of an annotated
+// (or signed) tag. Refer to upstream documentation for more info:
+// https://github.com/git/git/blob/master/Documentation/technical/reftable.txt
+type PeelingOption uint8
+
+const (
+ // IgnorePeeled ignores all peeled reference names. This is the default behavior.
+ IgnorePeeled PeelingOption = 0
+ // OnlyPeeled returns only peeled reference names.
+ OnlyPeeled PeelingOption = 1
+ // AppendPeeled appends peeled reference names to the reference list.
+ AppendPeeled PeelingOption = 2
+)
+
// CleanOptions describes how a clean should be performed.
type CleanOptions struct {
Dir bool