MacOS still uses a very old version of bash, probably for open source
licencing reasons. Therefore, I cannot use modern substitutions like
`${foo^^}` and must fall back to using `tr` instead.
These use `mdsh` and `mandown` in order to automatically insert the
`help` messages into the markdown files, and then compile them to proper
manpages files.
Try to build manpages with the rest of the build
Before this change, when running `git add-coauthor` without an existing
`~/.git-coauthors` file, the program would print an error message on
stderr that the file did not exist.
It would then create the file with the newly added co-author in it.
That message seemed unnecessary and so it has now been removed.
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
The git2 default-features all have to do with ssh or ssh-keys. Those
require OpenSSL, which seems to be a bit tricky to get to compile
properly when cross-compiling on CI.
Also, since this project does not need those parts of the git2
dependency, we should be able to safely disable those features.
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
This change makes `get_main_author` try to fetch `user.name` and
`user.email` from the current repo before falling back to a global
default.
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
We currently ensure this by simply overriding any existing template.
This is of course sub-optimal, but the previous recommendation, to
globally set `commit.template` to a relative path would otherwise make
`git commit` crash when run in a repo without first creating that
template file, e.g. by running `git mob ...` or `git solo` in the
project directory before committing anything.
This way, we don't have to globally set `commit.template`, and git-mob
will still work.
This change allows the `-o <initials>` flag to override who the main
author of any commits in this repo will be going forward.
What this actually does, is that it modifies the Repository's config
file to change the `user.name` and `user.email` like this.
Running `git mob -o ae be` (given the corresponding authors have been
configured using `git add-coauthor`) is equivalent to doing:
git config user.name "Alice Example"
git config user.email "alice@example.com"
git mob be # be being the initials of "Bob Example" <bob@example.com>
Since the only thing the `repo` argument to `with_repo_or_exit` was used
for, was to extract the gitmessage template path from it, we can just do
that directly instead.