Catch and report "ERR message" during remote advertisements
commit1f4a30b80d734d28baeb48fb45013716f0afb7a4
authorShawn O. Pearce <spearce@spearce.org>
Thu, 11 Feb 2010 19:43:29 +0000 (11 11:43 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Sat, 13 Mar 2010 00:08:14 +0000 (12 16:08 -0800)
tree330aa282dab3173dbd507948a9a313af5e1d74ae
parent243b0d64a68990b10a3e6e0d5612cd5bb25626f8
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>
org.eclipse.jgit/src/org/eclipse/jgit/errors/RemoteRepositoryException.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java