[PATCH 2/2] CLI/git: add --format-version argument to init subcommand

2022-06-23 Thread David Bremner
This is primarily intended to support testing upward compatibility with legacy repos. --- doc/man1/notmuch-git.rst | 8 ++- notmuch-git.py | 43 ++--- test/T850-git.sh | 46 3 files changed, 84 insertio

[PATCH 1/2] CL/git: add format version 1

2022-06-23 Thread David Bremner
The original nmbug format (now called version 0) creates 1 subdirectory of 'tags/' per message. This causes problems for more than (roughly) 100k messages. Version 1 introduces 2 layers of hashed directories. This scheme was chose to balance the number of subdirectories with the number of extra di

Add hashed directory structure to notmuch git

2022-06-23 Thread David Bremner
Old repos (in particular nmbug) should keep working transparently, but new ones will be created with a couple of layers of hashed directories to avoid problems with (at least) ext4 file systems and too many subdirectories in a given directory. There is no history preserving upgrade path in this se