aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote.go2
-rw-r--r--repository.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/remote.go b/remote.go
index e8d56fc..1894fdc 100644
--- a/remote.go
+++ b/remote.go
@@ -46,6 +46,8 @@ func (r *Remote) String() string {
}
// Fetch fetches references from the remote to the local repository.
+// Returns nil if the operation is successful, NoErrAlreadyUpToDate if there are
+// no changes to be fetched, or an error.
func (r *Remote) Fetch(o *FetchOptions) error {
_, err := r.fetch(o)
return err
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