]> source.dussan.org Git - jgit.git/commit
push: support per-ref force-with-lease 27/88127/3
authorDavid Turner <dturner@twosigma.com>
Wed, 4 Jan 2017 04:56:08 +0000 (23:56 -0500)
committerDavid Turner <dturner@twosigma.com>
Thu, 9 Feb 2017 00:42:33 +0000 (19:42 -0500)
commit46d35a85025ff2e5184422a79451ce724a69a9ec
tree694c512aafccb4b47ab6804461fa3f3953c18e91
parentdb776102566a472e76073997cddf5417cc02389b
push: support per-ref force-with-lease

When rebasing, force-pushing has a race condition: someone else might
have pushed a commit since the one you just rewrote. The force-with-lease
option prevents this by ensuring that the ref's old value is the one
that you expected.

Change-Id: I97ca9f8395396c76332bdd07c486e60549ca4401
Signed-off-by: David Turner <dturner@twosigma.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefLeaseSpec.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java