]> source.dussan.org Git - jgit.git/commit
Better report too large pack-files from PushCommand 48/46348/7
authorChristian Halstrick <christian.halstrick@sap.com>
Thu, 23 Apr 2015 13:24:25 +0000 (15:24 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 27 May 2015 21:52:53 +0000 (23:52 +0200)
commit261b514ceb4271275d7ea68b20eee109442e0af4
treeddfd55fdcb9a6c23f1b38b3b44a0612447a7d1fe
parentb8c8008115e0c48d3d844af1dc858c700a9428e4
Better report too large pack-files from PushCommand

JGits PushCommand and BasePackPushConnection were throwing generic
TransportExceptions when the pushed pack-file was rejected by the server
since it was too big. Let JGit better interprete the server's response
to detect this situation and throw a more specific exception.

This detection works by parsing the status line sent by the server. This
change only recognizes the response sent by a JGit based server. All
other servers which report such problems in a different way still lead
to a generic TransportExceptions.

Change-Id: Ic075764ea152939ce72c446252464620dd54edea
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargePackException.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/errors/TooLargePackException.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java