aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorTaru Karttunen <taruti@taruti.net>2017-09-19 14:29:01 +0300
committerJeremy Stribling <strib@alum.mit.edu>2017-11-27 11:43:01 -0800
commit77482f9ac6095ad4a863e348ab1ac9bf9ab2e0b2 (patch)
tree8d76dce04dc9278d10efa29ccc06b7bce1b00819 /remote.go
parentc4766ff1a7227de77bba488a8481f332ea8c1667 (diff)
downloadgo-git-77482f9ac6095ad4a863e348ab1ac9bf9ab2e0b2.tar.gz
Fetch - honor per refspec force flag
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.go b/remote.go
index ca93916..81d0ede 100644
--- a/remote.go
+++ b/remote.go
@@ -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