]> arthur.barton.de Git - bup.git/commitdiff
Make INDEX_SIG a bit easier to understand
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 20:53:19 +0000 (15:53 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 20:53:19 +0000 (15:53 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/index.py

index 9c81d9c8455786db8f3aae94bbdd073e87835536..44e26ffb717e061185407414fe7112676cdbf0b4 100644 (file)
@@ -17,7 +17,21 @@ INDEX_HDR = 'BUPI\0\0\0\6'
 # Record times (mtime, ctime, atime) as xstat/metadata timespecs, and
 # store all of the times in the index so they won't interfere with the
 # forthcoming metadata cache.
-INDEX_SIG =  '!QQQqQqQqQQII20sHIIQ'
+INDEX_SIG = ('!'
+             'Q'                # dev
+             'Q'                # ino
+             'Q'                # nlink
+             'qQ'               # ctime_s, ctime_ns
+             'qQ'               # mtime_s, mtime_ns
+             'qQ'               # atime_s, atime_ns
+             'Q'                # size
+             'I'                # mode
+             'I'                # gitmode
+             '20s'              # sha
+             'H'                # flags
+             'I'                # children_ofs
+             'I'                # children_n
+             'Q')               # meta_ofs
 
 ENTLEN = struct.calcsize(INDEX_SIG)
 FOOTER_SIG = '!Q'