]> arthur.barton.de Git - bup.git/commit
cmd/midx, git.py: all else being equal, delete older midxes first.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 18 Feb 2011 09:15:47 +0000 (01:15 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 18 Feb 2011 09:18:28 +0000 (01:18 -0800)
commit068be894919faf809dd430149f8b066bb0556cc1
treec130bc2986073b6f03a6d25e9a44e27dd93ef9b1
parentb4edd676672740219a9774cd194f4b5b4cc543b7
cmd/midx, git.py: all else being equal, delete older midxes first.

Previous runs of 'bup midx -f' might have created invalid midx files with
exactly the same length as a newer run.  bup's "prune redundant midx" logic
would quasi-randomly choose one or the other to delete (based on
alphabetical order of filenames, basically) and sometimes that would be the
new one, not the old one, so the 'bup midx -f' results never actually kicked
in.

Now if the file sizes are equal we'll use the mtime as a tie breaker; newer
is better.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/midx-cmd.py
lib/bup/git.py
t/test.sh