From c69cc0a9bcec57225d9d71f9b98818a207b14202 Mon Sep 17 00:00:00 2001 From: Martin Frost Date: Sat, 23 May 2020 16:30:46 +0200 Subject: [PATCH] git-delete-coauthor --- src/bin/git-delete-coauthor.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/bin/git-delete-coauthor.rs diff --git a/src/bin/git-delete-coauthor.rs b/src/bin/git-delete-coauthor.rs new file mode 100644 index 0000000..4c8ef57 --- /dev/null +++ b/src/bin/git-delete-coauthor.rs @@ -0,0 +1,15 @@ +use git_mob::{get_available_coauthors, write_coauthors_file} ; +use structopt::StructOpt; + +#[derive(StructOpt,Debug)] +struct Opt { + /// Initials of the co-author to delete + initials: String, +} + +fn main() { + let opt = Opt::from_args(); + let mut authors = get_available_coauthors(); + authors.remove(&opt.initials); + write_coauthors_file(authors); +}