瀏覽代碼

pack.create_delta: rename a couple of variables to make the code clearer

Change-Id: I5fed216800445277d6e069e0b20051006330d405
Augie Fackler 11 年之前
父節點
當前提交
ed3089ee11
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      dulwich/pack.py

+ 6 - 6
dulwich/pack.py

@@ -1621,15 +1621,15 @@ def create_delta(base_buf, target_buf):
             # Write out an opcode that says what range to use
             scratch = ''
             op = 0x80
-            o = i1
+            copy_start = i1
             for i in range(4):
-                if o & 0xff << i*8:
-                    scratch += chr((o >> i*8) & 0xff)
+                if copy_start & 0xff << i*8:
+                    scratch += chr((copy_start >> i*8) & 0xff)
                     op |= 1 << i
-            s = i2 - i1
+            copy_len = i2 - i1
             for i in range(2):
-                if s & 0xff << i*8:
-                    scratch += chr((s >> i*8) & 0xff)
+                if copy_len & 0xff << i*8:
+                    scratch += chr((copy_len >> i*8) & 0xff)
                     op |= 1 << (4+i)
             out_buf += chr(op)
             out_buf += scratch