diff options
| author | David Bremner <david@tethera.net> | 2022-05-10 07:32:48 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-06-17 08:40:19 -0300 |
| commit | 99e85823c8de570c0f91bca44efa2c47cddb3cbf (patch) | |
| tree | 148af614177d70a190555ecbcb7c76298398185d /notmuch-git.py | |
| parent | 8ed68c1bbe8c1b7bb69d7bea1e0c8919bfcb0d0a (diff) | |
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.
Diffstat (limited to 'notmuch-git.py')
| -rw-r--r-- | notmuch-git.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/notmuch-git.py b/notmuch-git.py index 9d5c7876..35785336 100644 --- a/notmuch-git.py +++ b/notmuch-git.py @@ -1019,7 +1019,9 @@ if __name__ == '__main__': if nmbug_mode: default = _os.path.join('~', '.nmbug') else: - default = xdg_data_path(notmuch_profile) + default = _notmuch_config_get ('git.path') + if default == '': + default = xdg_data_path(notmuch_profile) NOTMUCH_GIT_DIR = _os.path.expanduser(_os.getenv('NOTMUCH_GIT_DIR', default)) @@ -1033,7 +1035,7 @@ if __name__ == '__main__': if nmbug_mode: prefix = 'notmuch::' else: - prefix = '' + prefix = _notmuch_config_get ('git.tag_prefix') TAG_PREFIX = _os.getenv('NOTMUCH_GIT_PREFIX', prefix) |
