]> source.dussan.org Git - jgit.git/commit
Use constants for git packet protocol line identifiers 80/194780/5
authorThomas Wolf <twolf@apache.org>
Tue, 19 Jul 2022 08:13:48 +0000 (10:13 +0200)
committerThomas Wolf <twolf@apache.org>
Sun, 31 Jul 2022 12:08:48 +0000 (14:08 +0200)
commiteef4da5dacb8f0fdcec5b197d8633278ba448f2c
tree0664091b0d5a5b3266c48f628141cb299dc90b93
parent673007d52909eb02e301b900f315f5dc91b16209
Use constants for git packet protocol line identifiers

Introduce named constants for packet line headers and use them instead
of direct string literals everywhere. This not only makes the code more
readable because we don't need NON-NLS markers, it also makes it more
robust since we can use the length of these constants instead of magic
numbers.

Change-Id: Ie4b7239e0b479a68a2dc23e6e05f25061d481a31
Signed-off-by: Thomas Wolf <twolf@apache.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java