Commit graph

6 commits

Author SHA1 Message Date
David Bremner
a85c82f99a test: initial tests for notmuch-git
Exercise the main functionality of notmuch-git.  add_git_repos() will
hopefully be simplifed when an init subcommand is added.
2022-06-17 08:40:19 -03:00
W. Trevor King
14ac68ae11 CLI/git: Add an 'init' command
For folks that want to start versioning a new tag-space, instead of
cloning one that someone else has already started.

The empty-blob hash-object call avoids errors like:

  $ nmbug commit
  error: invalid object 100644 e69de29bb2 for
'tags/...'
  fatal: git-write-tree: error building trees
  'git HASH(0x9ef3eb8) write-tree' exited with nonzero value

David Bremner suggested [1]:

  $ git hash-object -w /dev/null

instead of my Python version of:

  $ git hash-object -w --stdin <&-

but I expect that closing stdin is more portable than the /dev/null
path (which doesn't exist on Windows, for example).

The --bare init and use of NMBGIT as the work tree (what could go
wrong with an empty commit?) are suggestions from Michal Sojka [2].

[1]: id:87y4vu6uvf.fsf@maritornes.cs.unb.ca
     http://thread.gmane.org/gmane.mail.notmuch.general/18626/focus=18720
[2]: id:87a93a5or2.fsf@resox.2x.cz
     http://thread.gmane.org/gmane.mail.notmuch.general/19495/focus=19767
2022-06-17 08:40:19 -03:00
David Bremner
a01378e48d CLI/git: make existance of config branch optional on clone
This branch is actually only used by an associated
utility (notmuch-report), and notmuch-git works fine without it.
2022-06-17 08:40:19 -03:00
David Bremner
b7b111b9b5 notmuch-git: add --git-dir, --tag-prefix arguments
It is often more convenient to use command line arguments than
environment variables.
2022-06-17 08:40:19 -03:00
David Bremner
b7c31f6581 CLI/git: drop support for python < 3.2
Debian stable had python 3.4.2 3 releases ago (approximately 6 years
ago), so attempting to keep track of the changes in python is probably
no longer worthwhile. We already require python 3.5 for the
python-cffi bindings (although those are not yet used in notmuch-git).
2022-06-17 08:40:19 -03:00
David Bremner
803ac83c46 nmbug: promote to user tool "notmuch-git"
Initially just a rename, and drop the --version argument that clashes
with the global notmuch --version argument.
2022-06-17 08:40:19 -03:00
Renamed from devel/nmbug/nmbug (Browse further)