Unified · Split
| @@ -13,7 +13,7 @@ use git_repository::bstr::io::BufReadExt; · 12 unmodified lines | ||
| 13 | 13 | use gitoxide_core as core; |
| 14 | 14 | use gitoxide_core::pack::verify; |
| 15 | 15 | |
| 16 | −use crate::plumbing::options::{commit, odb, revision, tree}; | |
| 16 | +use crate::plumbing::options::{commit, mailmap, odb, revision, tree}; | |
| 17 | 17 | use crate::{ |
| 18 | 18 | plumbing::options::{free, repo, Args, Subcommands}, |
| 19 | 19 | shared::pretty::prepare_and_run, |
| @@ -599,6 +599,16 @@ pub fn main() -> Result<()> { · 579 unmodified lines | ||
| 599 | 599 | move |_progress, out, err| core::repository::odb::info(repository()?.into(), format, out, err), |
| 600 | 600 | ), |
| 601 | 601 | }, |
| 602 | + Subcommands::Mailmap { cmd } => match cmd { | |
| 603 | + mailmap::Subcommands::Entries => prepare_and_run( | |
| 604 | + "repository-mailmap-entries", | |
| 605 | + verbose, | |
| 606 | + progress, | |
| 607 | + progress_keep_open, | |
| 608 | + None, | |
| 609 | + move |_progress, out, err| core::repository::mailmap::entries(repository()?.into(), format, out, err), | |
| 610 | + ), | |
| 611 | + }, | |
| 602 | 612 | Subcommands::Repository(repo::Platform { cmd }) => match cmd { |
| 603 | 613 | repo::Subcommands::Exclude { cmd } => match cmd { |
| 604 | 614 | repo::exclude::Subcommands::Query { |
| @@ -635,18 +645,6 @@ pub fn main() -> Result<()> { · 30 unmodified lines | ||
| 635 | 645 | }, |
| 636 | 646 | ), |
| 637 | 647 | }, |
| 638 | − repo::Subcommands::Mailmap { cmd } => match cmd { | |
| 639 | − repo::mailmap::Subcommands::Entries => prepare_and_run( | |
| 640 | − "repository-mailmap-entries", | |
| 641 | − verbose, | |
| 642 | − progress, | |
| 643 | − progress_keep_open, | |
| 644 | − None, | |
| 645 | − move |_progress, out, err| { | |
| 646 | − core::repository::mailmap::entries(repository()?.into(), format, out, err) | |
| 647 | − }, | |
| 648 | − ), | |
| 649 | − }, | |
| 650 | 648 | }, |
| 651 | 649 | }?; |
| 652 | 650 | Ok(()) |
| @@ -76,6 +76,11 @@ pub enum Subcommands { · 75 unmodified lines | ||
| 76 | 76 | #[clap(subcommand)] |
| 77 | 77 | cmd: revision::Subcommands, |
| 78 | 78 | }, |
| 79 | + /// Interact with the mailmap. | |
| 80 | + Mailmap { | |
| 81 | + #[clap(subcommand)] | |
| 82 | + cmd: mailmap::Subcommands, | |
| 83 | + }, | |
| 79 | 84 | /// Subcommands for interacting with entire git repositories |
| 80 | 85 | Repository(repo::Platform), |
| 81 | 86 | /// Subcommands that need no git repository to run. |
| @@ -83,6 +88,14 @@ pub enum Subcommands { · 1 unmodified line | ||
| 83 | 88 | Free(free::Subcommands), |
| 84 | 89 | } |
| 85 | 90 | |
| 91 | +pub mod mailmap { | |
| 92 | + #[derive(Debug, clap::Subcommand)] | |
| 93 | + pub enum Subcommands { | |
| 94 | + /// Print all entries in configured mailmaps, inform about errors as well. | |
| 95 | + Entries, | |
| 96 | + } | |
| 97 | +} | |
| 98 | + | |
| 86 | 99 | pub mod odb { |
| 87 | 100 | #[derive(Debug, clap::Subcommand)] |
| 88 | 101 | pub enum Subcommands { |
| @@ -579,11 +592,6 @@ pub mod repo { · 490 unmodified lines | ||
| 579 | 592 | #[derive(Debug, clap::Subcommand)] |
| 580 | 593 | #[clap(visible_alias = "repo")] |
| 581 | 594 | pub enum Subcommands { |
| 582 | − /// Interact with the mailmap. | |
| 583 | − Mailmap { | |
| 584 | − #[clap(subcommand)] | |
| 585 | − cmd: mailmap::Subcommands, | |
| 586 | − }, | |
| 587 | 595 | /// Interact with the exclude files like .gitignore. |
| 588 | 596 | Exclude { |
| 589 | 597 | #[clap(subcommand)] |
| @@ -616,12 +624,4 @@ pub mod repo { · 26 unmodified lines | ||
| 616 | 624 | }, |
| 617 | 625 | } |
| 618 | 626 | } |
| 619 | − | |
| 620 | − pub mod mailmap { | |
| 621 | − #[derive(Debug, clap::Subcommand)] | |
| 622 | − pub enum Subcommands { | |
| 623 | − /// Print all entries in configured mailmaps, inform about errors as well. | |
| 624 | − Entries, | |
| 625 | − } | |
| 626 | − } | |
| 627 | 627 | } |