diff options
author | Shawn Pearce <spearce@spearce.org> | 2015-12-02 21:47:58 -0800 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2015-12-02 22:06:06 -0800 |
commit | 3d8e6b1e16092701c31463092e945b8f00886bb7 (patch) | |
tree | d02684d25c4b68bf331ea3c7405df2ad4cac5b86 /org.eclipse.jgit.pgm | |
parent | f109af47d07ecc20767f245a384ebd1dc201b6af (diff) | |
download | jgit-3d8e6b1e16092701c31463092e945b8f00886bb7.tar.gz jgit-3d8e6b1e16092701c31463092e945b8f00886bb7.zip |
Support atomic push in JGit client
This should mirror the behavior of `git push --atomic` where the
client asks the server to apply all-or-nothing. Some JGit servers
already support this based on a custom DFS backend. InMemoryRepository
is extended to support atomic push for unit testing purposes.
Local disk server side support inside of JGit is a more complex animal
due to the excessive amount of file locking required to protect every
reference as a loose reference.
Change-Id: I15083fbe48447678e034afeffb4639572a32f50c
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java index 1879ef51ff..9098c1263d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java @@ -82,6 +82,9 @@ class Push extends TextBuiltin { @Option(name = "--all") private boolean all; + @Option(name = "--atomic") + private boolean atomic; + @Option(name = "--tags") private boolean tags; @@ -122,6 +125,7 @@ class Push extends TextBuiltin { push.setPushTags(); push.setRemote(remote); push.setThin(thin); + push.setAtomic(atomic); push.setTimeout(timeout); Iterable<PushResult> results = push.call(); for (PushResult result : results) { |