diff options
Diffstat (limited to 'worktree.go')
-rw-r--r-- | worktree.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/worktree.go b/worktree.go index 7f394d4..62ad03b 100644 --- a/worktree.go +++ b/worktree.go @@ -93,7 +93,12 @@ func (w *Worktree) PullContext(ctx context.Context, o *PullOptions) error { head, err := w.r.Head() if err == nil { - if !updated && head.Hash() == ref.Hash() { + headAheadOfRef, err := isFastForward(w.r.Storer, ref.Hash(), head.Hash()) + if err != nil { + return err + } + + if !updated && headAheadOfRef { return NoErrAlreadyUpToDate } |