diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-08-31 17:43:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-31 17:43:27 +0200 |
commit | 6da5e5958ecc0e6f8da6ee2b6714e50b8ef26df4 (patch) | |
tree | c0eec2aae09993118c120fa04db57bf1bd1126f9 /remote.go | |
parent | 5bf939bc5c03b149e7ec80653bcaa901d05d0d44 (diff) | |
parent | 711b703b572e07d3d0437eae4662419b5c392a6b (diff) | |
download | go-git-6da5e5958ecc0e6f8da6ee2b6714e50b8ef26df4.tar.gz |
Merge pull request #158 from chrisgavin/fix-force-push-delete-reference
git: remote, Fix deleting references when force pushing.
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -126,7 +126,7 @@ func (r *Remote) PushContext(ctx context.Context, o *PushOptions) (err error) { if o.Force { for i := 0; i < len(o.RefSpecs); i++ { rs := &o.RefSpecs[i] - if !rs.IsForceUpdate() { + if !rs.IsForceUpdate() && !rs.IsDelete() { o.RefSpecs[i] = config.RefSpec("+" + rs.String()) } } |