aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-08-22 00:18:02 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-08-22 00:18:02 +0200
commitf42d82364c5d159f65a48e720433ad2bc97f0b7f (patch)
tree82623f4163625786f4e8e41028dcd1c7abaf209f /core
parenta045606fc9c5cbf30b409384cbdad4804f01c61d (diff)
downloadgo-git-f42d82364c5d159f65a48e720433ad2bc97f0b7f.tar.gz
Remote.Fetch multiple RefSpec support
Diffstat (limited to 'core')
-rw-r--r--core/reference.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/reference.go b/core/reference.go
index 1325c7e..c33402c 100644
--- a/core/reference.go
+++ b/core/reference.go
@@ -2,6 +2,7 @@ package core
import (
"errors"
+ "fmt"
"io"
"strings"
)
@@ -143,6 +144,11 @@ func (r *Reference) Strings() [2]string {
return o
}
+func (r *Reference) String() string {
+ s := r.Strings()
+ return fmt.Sprintf("%s %s", s[1], s[0])
+}
+
// ReferenceSliceIter implements ReferenceIter. It iterates over a series of
// references stored in a slice and yields each one in turn when Next() is
// called.