Commit graph

6 commits

Author SHA1 Message Date
David Bremner
bf5eacbe7e CLI/git: add --format-version argument to init subcommand
This is primarily intended to support testing upward compatibility
with legacy repos.
2022-07-07 07:05:55 -03:00
David Bremner
6219e7380a CL/git: add format version 1
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
directories (and git objects) created via hashing.

This should be upward compatible in the sense that old repositories
will continue to work with the updated notmuch-git.
2022-07-07 06:56:05 -03:00
David Bremner
7d1e5a5348 CLI/git: add safety checks for checkout and commit
Commits or checkouts that modify a large fraction of the messages in
the database should be relatively rare (and in some automated process,
probably non-existent). For initial setup, where such operations are
expected, the user can pass --force.
2022-06-17 08:40:19 -03:00
David Bremner
99e85823c8 CLI/git: support configuration for repo location / prefix
This is probably more convenient than always passing a command line
argument.

Use notmuch-config for consistency with other notmuch CLI tools.

Now that there is something relevant in the config files, test the
--config option.
2022-06-17 08:40:19 -03:00
David Bremner
8ed68c1bbe CLI/git: change defaults for repo and prefix
The previous defaults were not suitable for personal (i.e. not
bugtracking for notmuch development) use.

Provide two ways for the user to select nmbug compatible defaults;
command line argument and checking the name of the script.
2022-06-17 08:40:19 -03:00
David Bremner
e50a413906 doc/notmuch-git: initial documentation
This is mainly derived from the various help outputs from the script,
with some massaging of markup and addition of links.
2022-06-17 08:40:19 -03:00