Catch and report "ERR message" during remote advertisements
GitHub broke the native git protocol a while ago by interjecting an
"ERR message" line into the upload-pack or receive-pack advertisement
list. This didn't match the expected pattern, so it caused existing
C Git clients to abort with a protocol exception.
These days, C Git clients actually look for this message and abort
with a more graceful notice to the end-user. JGit should do the
same, including setting up a custom exception type that makes it
easier for higher-level UIs to identify a message from the remote
site and present it to the user.
Change-Id: I51ab62a382cfaf1082210e8bfaa69506fd0d9786
Signed-off-by:
Shawn O. Pearce <spearce@spearce.org>
Showing
- org.eclipse.jgit/src/org/eclipse/jgit/errors/RemoteRepositoryException.java 70 additions, 0 deletions...rc/org/eclipse/jgit/errors/RemoteRepositoryException.java
- org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java 20 additions, 0 deletions...it/src/org/eclipse/jgit/transport/BasePackConnection.java
Loading
Please register or sign in to comment