aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-05-14 15:25:47 -0300
committerDavid Bremner <david@tethera.net>2022-06-17 08:40:19 -0300
commit7d1e5a5348eb348a4e457650ca3b929e85efde70 (patch)
treee2335d92be028b925df0adcf681a982921cc0984 /doc
parent99e85823c8de570c0f91bca44efa2c47cddb3cbf (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/man1/notmuch-config.rst7
-rw-r--r--doc/man1/notmuch-git.rst14
2 files changed, 19 insertions, 2 deletions
diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst
index e2e9a632..388315f6 100644
--- a/doc/man1/notmuch-config.rst
+++ b/doc/man1/notmuch-config.rst
@@ -111,6 +111,13 @@ paths are presumed relative to `$HOME` for items in section
Default location for git repository for :any:`notmuch-git`.
+.. nmconfig:: git.safe_fraction
+
+ Some :any:`notmuch-git` operations check that the fraction of
+ messages changed (in the database or in git, as appropriate) is not
+ too large. This item controls what fraction of total messages is
+ considered "not too large".
+
.. nmconfig:: git.tag_prefix
Default tag prefix (filter) for :any:`notmuch-git`.
diff --git a/doc/man1/notmuch-git.rst b/doc/man1/notmuch-git.rst
index ad859b80..fa7a748e 100644
--- a/doc/man1/notmuch-git.rst
+++ b/doc/man1/notmuch-git.rst
@@ -73,13 +73,18 @@ Dump a tar archive of a committed tag set using 'git archive'. See
:manpage:`git-archive(1)`. Arguments to `git-archive` are reordered
so that *tree-ish* comes last.
-.. option:: checkout
+.. option:: checkout [-f|--force]
Update the notmuch database from Git.
This is mainly useful to discard your changes in notmuch relative
to Git.
+ .. describe:: [-f|--force]
+
+ Override checks that prevent modifying tags for large fractions of
+ messages in the database. See also :nmconfig:`git.safe_fraction`.
+
.. option:: clone <repository>
Create a local `notmuch git` repository from a remote source.
@@ -94,7 +99,7 @@ upstreams.
section of :manpage:`git-clone(1)` for more information on
specifying repositories.
-.. option:: commit [message]
+.. option:: commit [-f|--force] [message]
Commit prefix-matching tags from the notmuch database to Git.
@@ -102,6 +107,11 @@ Commit prefix-matching tags from the notmuch database to Git.
Optional text for the commit message.
+ .. describe:: -f|--force
+
+ Override checks that prevent modifying tags for large fractions of
+ messages in the database. See also :nmconfig:`git.safe_fraction`.
+
.. option:: fetch [remote]
Fetch changes from the remote repository.