aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2021-12-10 06:52:00 +0100
committerGitHub <noreply@github.com>2021-12-10 06:52:00 +0100
commit32c4f532abd57797322e97d95dfa02821980e309 (patch)
tree63afb89d42b388316d045820b44972f54e0b8f01 /remote.go
parent39f97ab86a776dd8acd58a79a660d0cfdb7068c0 (diff)
parentfe158cd6e176682e087efea9625ec5409f2956bf (diff)
downloadgo-git-32c4f532abd57797322e97d95dfa02821980e309.tar.gz
Merge pull request #406 from john-cai/jc-push-atomic
Remote: Push, add atomic to push options
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/remote.go b/remote.go
index fecdebf..0299f9c 100644
--- a/remote.go
+++ b/remote.go
@@ -326,7 +326,12 @@ func (r *Remote) newReferenceUpdateRequest(
}
}
+ if o.Atomic && ar.Capabilities.Supports(capability.Atomic) {
+ _ = req.Capabilities.Set(capability.Atomic)
+ }
+
if err := r.addReferencesToUpdate(o.RefSpecs, localRefs, remoteRefs, req, o.Prune, o.ForceWithLease); err != nil {
+
return nil, err
}