diff options
author | Taru Karttunen <taruti@taruti.net> | 2017-09-19 14:29:01 +0300 |
---|---|---|
committer | Jeremy Stribling <strib@alum.mit.edu> | 2017-11-27 11:43:01 -0800 |
commit | 77482f9ac6095ad4a863e348ab1ac9bf9ab2e0b2 (patch) | |
tree | 8d76dce04dc9278d10efa29ccc06b7bce1b00819 | |
parent | c4766ff1a7227de77bba488a8481f332ea8c1667 (diff) | |
download | go-git-77482f9ac6095ad4a863e348ab1ac9bf9ab2e0b2.tar.gz |
Fetch - honor per refspec force flag
-rw-r--r-- | remote.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -799,7 +799,7 @@ func (r *Remote) updateLocalReferenceStorage( // If the ref exists locally as a branch and force is not specified, // only update if the new ref is an ancestor of the old - if old != nil && old.Name().IsBranch() && !force { + if old != nil && old.Name().IsBranch() && !force && !spec.IsForceUpdate() { ff, err := isFastForward(r.s, old.Hash(), new.Hash()) if err != nil { return updated, err |