]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/hashsplit.py
Enforce MAX_PER_TREE by always _squish()ing in spit_to_shalist().
[bup.git] / lib / bup / hashsplit.py
index 914c2bb5a8e04b532a78e3b860ac2b23216288dc..3dffbbe857874c3142d054d3b3cd15d9bd22c4d9 100644 (file)
@@ -10,6 +10,7 @@ fanout = 16
 
 GIT_MODE_FILE = 0100644
 GIT_MODE_TREE = 040000
+GIT_MODE_SYMLINK = 0120000
 assert(GIT_MODE_TREE != 40000)  # 0xxx should be treated as octal
 
 # The purpose of this type of buffer is to avoid copying on peek(), get(),
@@ -158,8 +159,7 @@ def split_to_shalist(makeblob, maketree, files,
         stacks = [[]]
         for (sha,size,level) in sl:
             stacks[0].append((GIT_MODE_FILE, sha, size))
-            if level:
-                _squish(maketree, stacks, level)
+            _squish(maketree, stacks, level)
         #log('stacks: %r\n' % [len(i) for i in stacks])
         _squish(maketree, stacks, len(stacks)-1)
         #log('stacks: %r\n' % [len(i) for i in stacks])