Browse Source

Advertise ofs-delta in server side capabilities.

Jelmer Vernooij 10 years ago
parent
commit
343a8ac737
3 changed files with 5 additions and 3 deletions
  1. 2 0
      NEWS
  2. 1 1
      dulwich/server.py
  3. 2 2
      dulwich/tests/test_porcelain.py

+ 2 - 0
NEWS

@@ -8,6 +8,8 @@
     open resources. (Gary van der Merwe)
   * Support 'git.bat' in SubprocessGitClient on Windows.
     (Stefan Zimmermann)
+  * Advertise 'ofs-delta' capability in receive-pack server side
+    capabilities. (Jelmer Vernooij)
 
  BUG FIXES
 

+ 1 - 1
dulwich/server.py

@@ -837,7 +837,7 @@ class ReceivePackHandler(Handler):
     @classmethod
     def capabilities(cls):
         return (CAPABILITY_REPORT_STATUS, CAPABILITY_DELETE_REFS,
-                CAPABILITY_SIDE_BAND_64K, CAPABILITY_NO_DONE)
+                CAPABILITY_OFS_DELTA, CAPABILITY_SIDE_BAND_64K, CAPABILITY_NO_DONE)
 
     def _apply_pack(self, refs):
         all_exceptions = (IOError, OSError, ChecksumMismatch, ApplyDeltaError,

+ 2 - 2
dulwich/tests/test_porcelain.py

@@ -644,8 +644,8 @@ class ReceivePackTests(PorcelainTestCase):
         exitcode = porcelain.receive_pack(self.repo.path, BytesIO(b"0000"), outf)
         outlines = outf.getvalue().splitlines()
         self.assertEqual([
-            b'00639e65bdcf4a22cdd4f3700604a275cd2aaf146b23 HEAD\x00 report-status '
-            b'delete-refs side-band-64k no-done',
+            b'006d9e65bdcf4a22cdd4f3700604a275cd2aaf146b23 HEAD\x00 report-status '
+            b'delete-refs ofs-delta side-band-64k no-done',
             b'003f9e65bdcf4a22cdd4f3700604a275cd2aaf146b23 refs/heads/master',
             b'0000'], outlines)
         self.assertEqual(0, exitcode)