]> arthur.barton.de Git - bup.git/commitdiff
INDEX_SIG: widen children_ofs to 64-bit
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 20:55:50 +0000 (15:55 -0500)
committerRob Browning <rlb@defaultvalue.org>
Wed, 12 Oct 2016 04:39:15 +0000 (23:39 -0500)
This should avoid failures when the index grows larger than 4GB.

Update the index format header to 'BUPI\0\0\0\7' (version 7).

Thanks to phillipproell amd Wayne Scott for reporting the problem,
and helping track down the cause/fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/index.py

index 44e26ffb717e061185407414fe7112676cdbf0b4..a570784da81c5c2a7e6b30cb2922fe30975d40e7 100644 (file)
@@ -8,7 +8,7 @@ from bup.helpers import (add_error, log, merge_iter, mmap_readwrite,
 EMPTY_SHA = '\0'*20
 FAKE_SHA = '\x01'*20
 
-INDEX_HDR = 'BUPI\0\0\0\6'
+INDEX_HDR = 'BUPI\0\0\0\7'
 
 # Time values are handled as integer nanoseconds since the epoch in
 # memory, but are written as xstat/metadata timespecs.  This behavior
@@ -29,7 +29,7 @@ INDEX_SIG = ('!'
              'I'                # gitmode
              '20s'              # sha
              'H'                # flags
-             'I'                # children_ofs
+             'Q'                # children_ofs
              'I'                # children_n
              'Q')               # meta_ofs