aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-01-12 08:45:16 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-01-12 08:45:16 +0100
commit3952f0130a68c7574ffd99e17536d11f3b4ae0ed (patch)
treeef9b2cff888b581d118c41fe7f3fd07178ad10b0 /repository.go
parent0c6c986ddd9855c8fd5f28771f824d7da73d4dc3 (diff)
downloadgo-git-3952f0130a68c7574ffd99e17536d11f3b4ae0ed.tar.gz
doc: clarify return values of Pull/Fetch. (#205)
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/repository.go b/repository.go
index 3c77188..e604d87 100644
--- a/repository.go
+++ b/repository.go
@@ -306,7 +306,9 @@ func (r *Repository) IsEmpty() (bool, error) {
})
}
-// Pull incorporates changes from a remote repository into the current branch
+// Pull incorporates changes from a remote repository into the current branch.
+// Returns nil if the operation is successful, NoErrAlreadyUpToDate if there are
+// no changes to be fetched, or an error.
func (r *Repository) Pull(o *PullOptions) error {
if err := o.Validate(); err != nil {
return err
@@ -333,6 +335,8 @@ func (r *Repository) Pull(o *PullOptions) error {
}
// Fetch fetches changes from a remote repository.
+// Returns nil if the operation is successful, NoErrAlreadyUpToDate if there are
+// no changes to be fetched, or an error.
func (r *Repository) Fetch(o *FetchOptions) error {
if err := o.Validate(); err != nil {
return err