Commit Graph

54 Commits

Author SHA1 Message Date
Martin Frost 8ec0cba227 Write absolute path to commit.template config var
This means that `git-mob` will work in git submodules.

Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
2022-05-13 18:26:16 +02:00
Martin Frost 6820d9b3ae v0.4.1 - ^^ 2021-12-26 23:38:45 +01:00
Martin Frost 5c5150fafb Use backwards-compatible bash syntax
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.
2021-12-26 23:35:04 +01:00
Martin Frost 854526724b v0.4.0 - Manual override 2021-12-25 20:07:12 +01:00
Martin Frost 201bb55bd0 Add manual assets with manpages to .deb 2021-12-25 19:59:06 +01:00
Martin Frost 5a90506317 Add skeleton manpages
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
2021-12-25 19:19:10 +01:00
Martin Frost 4de268ee20 Use clap for git-mob 2021-12-11 00:54:35 +01:00
Martin Frost 68e8e93bd0 Use clap for git-delete-coauthor 2021-12-11 00:54:35 +01:00
Martin Frost 2a4bcd896e Use clap for git-edit-coauthor 2021-12-11 00:41:09 +01:00
Martin Frost 2009e9335a Use clap for git-add-coauthor 2021-12-11 00:41:09 +01:00
Martin Frost b0067e9115 Use clap for git-solo 2021-12-11 00:41:09 +01:00
Martin Frost 7b3a10890d Add clap 3.0.0-rc.4 2021-12-11 00:39:37 +01:00
Martin Frost 2b2cdd54e5 Add more docs to structopt definitions
This makes the generated documentation a tad more explanatory.
2021-12-10 23:49:22 +01:00
Martin Frost c9603845d5 Add structopt for git-solo
This means that we can run `git-solo --help` and get some information on
what that command is doing. This was missing before.
2021-12-10 23:48:46 +01:00
Martin Frost ac1f066f43 Build .deb package 2021-08-24 00:08:06 +02:00
Martin Frost 8fc590906a v0.3.5 - More quiet
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
2021-08-20 22:51:50 +02:00
Martin Frost 9be6f97a5e Stop printing on stderr when adding first coauthor
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>
2021-08-20 22:43:05 +02:00
Martin Frost bb38091506 Update README with brew installation instructions
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
2021-08-20 22:18:49 +02:00
Martin Frost 95adc9a16d Build packages on branches that start with build-
Co-authored-by: Maria Hansson <mariahansson92@hotmail.com>
2021-08-20 21:07:06 +02:00
Martin Frost 579a9d0ad4 Disable default-features for git2
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>
2021-08-20 21:07:06 +02:00
Martin Frost e2d54e40ff Add note about binary packages to README 2021-08-20 17:12:17 +02:00
Martin Frost 1971673660
Merge pull request #1 from Frost/ci
Add CI workflow for linting and tests
2021-08-18 23:23:44 +02:00
Martin Frost b5757b3feb Remove TravisCI config 2021-08-18 23:20:17 +02:00
Martin Frost 4061981c4b Build artifacts when on main
This makes it easier for everyone to install git-mob and friends, since
they don't have to compile it themselves anymore.
2021-08-18 23:20:17 +02:00
Martin Frost fe1c91cfa5 Fix format 2021-08-18 23:20:02 +02:00
Martin Frost 9d09b31602 Fix needless-borrow 2021-08-18 23:20:02 +02:00
Martin Frost a97e37a9f3 Use &str instead of &String
We don't need a new object here, a slice is fine.
2021-08-18 23:20:02 +02:00
Martin Frost 79b73ee75c Add CI workflow for linting and tests 2021-08-18 23:20:02 +02:00
Martin Frost e60fae7031 v0.3.4 - Print correct main author
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>
2020-11-10 13:35:45 +01:00
Martin Frost 4575605991 v0.3.3 - Ensure commit.template is set
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.
2020-10-24 18:21:32 +02:00
Martin Frost 20997a0605 Rustfmt everything 2020-09-05 16:07:58 +02:00
Martin Frost a5ff50fd1b v0.3.2 - Fix typo in README 2020-06-19 13:52:49 +02:00
Martin Frost f45943f7a9 Fix typo in readme 2020-06-19 13:51:48 +02:00
Martin Frost 6d8df997d6 v0.3.1
Mention `git config commit.template` in README.
2020-06-19 13:49:03 +02:00
Martin Frost 5f88d5a029 v0.3.0 - Override main author
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>
2020-06-19 13:38:04 +02:00
Martin Frost dc822cdcac Update lockfile dependencies 2020-06-19 13:38:04 +02:00
Martin Frost 15886667da Extract `with_git_repo_or_exit`
This function will come in handy when doing other actions with a git
repo, like when modifying a repository's config.
2020-06-19 13:23:56 +02:00
Martin Frost 747e19828c Wrap gitmessage template path in closure
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.
2020-05-24 13:48:51 +02:00
Martin Frost 67f3f6b9b0 Add installation instructions to README 2020-05-24 13:31:01 +02:00
Martin Frost 609cdf83d8 Add git-edit-coauthor command
It is now possible to edit the available co-authors, in case you
misspelled someone's name, or they change their email address, or
something.
2020-05-24 13:23:15 +02:00
Martin Frost 64f7a10cd1 Flesh out manifest with more info 2020-05-23 23:41:18 +02:00
Martin Frost ea0bfc785d Add TravisCI config 2020-05-23 23:41:18 +02:00
Martin Frost b246b04c5a Add README.md 2020-05-23 23:41:18 +02:00
Martin Frost 934405ad4b Tidy up write_coauthors_to_gitmessage_file
* Inline closure
* Do some actual error handling
2020-05-23 21:05:04 +02:00
Martin Frost e64c6d7b74 Tidy up git-solo 2020-05-23 21:04:51 +02:00
Martin Frost c69cc0a9bc git-delete-coauthor 2020-05-23 20:56:53 +02:00
Martin Frost 8e46759b0a git-add-coauthor 2020-05-23 20:56:53 +02:00
Martin Frost 7b65f8e7b7 Write selected co-authors to .git/.gitmessage 2020-05-23 20:56:32 +02:00
Martin Frost ee7c56e0a0 Extract with_repo_or_exit
This will run a given function in a git repo, or print an error message
and exit if the current working directory is not within a git repo.
2020-05-23 20:56:32 +02:00
Martin Frost 41908686ed Extract gitmessage_template_file_path to lib
This piece of code will be used in a variety of places, so let's put it
somewhere where we can easily share it.
2020-05-23 20:56:32 +02:00