diff options
author | Shawn Pearce <sop@google.com> | 2013-11-01 14:14:25 -0600 |
---|---|---|
committer | Shawn Pearce <sop@google.com> | 2013-11-01 19:57:47 -0700 |
commit | b0dbb78e7d2287a5391a75e399009bf2203c4f24 (patch) | |
tree | c8f9b3a51788c86f5c1963b466fcf8403f0412e7 /org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java | |
parent | 1c4216e4bc17d3bdbce2e369a76e47607d7e3ff3 (diff) | |
download | jgit-b0dbb78e7d2287a5391a75e399009bf2203c4f24.tar.gz jgit-b0dbb78e7d2287a5391a75e399009bf2203c4f24.zip |
Extract protocol constants to a common class
This avoids the server from referencing the client code directly.
Change-Id: Ie6ade781b5a689646ad8b0b2988ef2b544412195
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java index 952515deda..e7e8af50a8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java @@ -71,6 +71,7 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectInserter; import org.eclipse.jgit.lib.ProgressMonitor; import org.eclipse.jgit.lib.Ref; +import org.eclipse.jgit.transport.GitProtocolConstants.MultiAck; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommitList; import org.eclipse.jgit.revwalk.RevFlag; @@ -129,72 +130,68 @@ public abstract class BasePackFetchConnection extends BasePackConnection * Include tags if we are also including the referenced objects. * @since 2.0 */ - public static final String OPTION_INCLUDE_TAG = "include-tag"; //$NON-NLS-1$ + public static final String OPTION_INCLUDE_TAG = GitProtocolConstants.OPTION_INCLUDE_TAG; /** * Mutli-ACK support for improved negotiation. * @since 2.0 */ - public static final String OPTION_MULTI_ACK = "multi_ack"; //$NON-NLS-1$ + public static final String OPTION_MULTI_ACK = GitProtocolConstants.OPTION_MULTI_ACK; /** * Mutli-ACK detailed support for improved negotiation. * @since 2.0 */ - public static final String OPTION_MULTI_ACK_DETAILED = "multi_ack_detailed"; //$NON-NLS-1$ + public static final String OPTION_MULTI_ACK_DETAILED = GitProtocolConstants.OPTION_MULTI_ACK_DETAILED; /** * The client supports packs with deltas but not their bases. * @since 2.0 */ - public static final String OPTION_THIN_PACK = "thin-pack"; //$NON-NLS-1$ + public static final String OPTION_THIN_PACK = GitProtocolConstants.OPTION_THIN_PACK; /** * The client supports using the side-band for progress messages. * @since 2.0 */ - public static final String OPTION_SIDE_BAND = "side-band"; //$NON-NLS-1$ + public static final String OPTION_SIDE_BAND = GitProtocolConstants.OPTION_SIDE_BAND; /** * The client supports using the 64K side-band for progress messages. * @since 2.0 */ - public static final String OPTION_SIDE_BAND_64K = "side-band-64k"; //$NON-NLS-1$ + public static final String OPTION_SIDE_BAND_64K = GitProtocolConstants.OPTION_SIDE_BAND_64K; /** * The client supports packs with OFS deltas. * @since 2.0 */ - public static final String OPTION_OFS_DELTA = "ofs-delta"; //$NON-NLS-1$ + public static final String OPTION_OFS_DELTA = GitProtocolConstants.OPTION_OFS_DELTA; /** * The client supports shallow fetches. * @since 2.0 */ - public static final String OPTION_SHALLOW = "shallow"; //$NON-NLS-1$ + public static final String OPTION_SHALLOW = GitProtocolConstants.OPTION_SHALLOW; /** * The client does not want progress messages and will ignore them. * @since 2.0 */ - public static final String OPTION_NO_PROGRESS = "no-progress"; //$NON-NLS-1$ + public static final String OPTION_NO_PROGRESS = GitProtocolConstants.OPTION_NO_PROGRESS; /** * The client supports receiving a pack before it has sent "done". * @since 2.0 */ - public static final String OPTION_NO_DONE = "no-done"; //$NON-NLS-1$ + public static final String OPTION_NO_DONE = GitProtocolConstants.OPTION_NO_DONE; /** * The client supports fetching objects at the tip of any ref, even if not * advertised. * @since 3.1 */ - public static final String OPTION_ALLOW_TIP_SHA1_IN_WANT = "allow-tip-sha1-in-want"; //$NON-NLS-1$ - - static enum MultiAck { - OFF, CONTINUE, DETAILED; - } + public static final String OPTION_ALLOW_TIP_SHA1_IN_WANT = GitProtocolConstants.OPTION_ALLOW_TIP_SHA1_IN_WANT; private final RevWalk walk; |