Explorar el Código

Add capability_symref.

Jelmer Vernooij hace 7 años
padre
commit
63469b09d4
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      dulwich/protocol.py

+ 5 - 0
dulwich/protocol.py

@@ -61,6 +61,7 @@ CAPABILITY_SHALLOW = b'shallow'
 CAPABILITY_SIDE_BAND_64K = b'side-band-64k'
 CAPABILITY_THIN_PACK = b'thin-pack'
 CAPABILITY_AGENT = b'agent'
+CAPABILITY_SYMREF = b'symref'
 
 # Magic ref that is used to attach capabilities to when
 # there are no refs. Should always be ste to ZERO_SHA.
@@ -75,6 +76,10 @@ def capability_agent():
     return CAPABILITY_AGENT + b'=' + agent_string()
 
 
+def capability_symref(from_ref, to_ref):
+    return CAPABILITY_SYMREF + b'=' + from_ref + b':' + to_ref
+
+
 COMMAND_DEEPEN = b'deepen'
 COMMAND_SHALLOW = b'shallow'
 COMMAND_UNSHALLOW = b'unshallow'