Skip to content

Commit

Permalink
Make gio commands less cumbersome, self-document their build type (pr…
Browse files Browse the repository at this point in the history
…etty, lean)
  • Loading branch information
Byron committed Jul 2, 2020
1 parent 269280a commit 1f9bc03
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ doctest = false


[[bin]]
name="gio-plumbing"
name="giop"
path="src/plumbing-cli.rs"
test = false
doctest = false
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ continuous-unit-tests: ## run all unit tests whenever something changes

journey-tests: always ## run stateless journey tests (pretty-cli)
cargo build
./tests/stateless-journey.sh target/debug/gio target/debug/gio-plumbing pretty_and_fast
./tests/stateless-journey.sh target/debug/gio target/debug/giop pretty_and_fast

journey-tests-lean-cli: always ## run stateless journey tests (lean-cli)
cargo build --no-default-features --features lean-cli
./tests/stateless-journey.sh target/debug/gio target/debug/gio-plumbing lean_and_small
./tests/stateless-journey.sh target/debug/gio target/debug/giop lean_and_small

continuous-journey-tests: ## run stateless journey tests whenever something changes
watchexec $(MAKE) journey-tests
Expand All @@ -78,8 +78,8 @@ $(rust_repo):

stress: ## Run various algorithms on big repositories
$(MAKE) -j2 $(rust_repo) release-lean
time ./target/release/gio-plumbing verify-pack --verbose $(rust_repo)/.git/objects/pack/*.idx
time ./target/release/gio-plumbing verify-pack --verbose --statistics $(rust_repo)/.git/objects/pack/*.idx
time ./target/release/giop verify-pack --verbose $(rust_repo)/.git/objects/pack/*.idx
time ./target/release/giop verify-pack --verbose --statistics $(rust_repo)/.git/objects/pack/*.idx

##@ Maintenance

Expand Down
3 changes: 2 additions & 1 deletion src/plumbing/lean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ mod options {
use std::path::PathBuf;

#[derive(FromArgs)]
/// A simple calculation tool
#[argh(name = "gio-plumbing")]
/// The lean git underworld
pub struct Args {
#[argh(subcommand)]
pub subcommand: SubCommands,
Expand Down
2 changes: 1 addition & 1 deletion src/plumbing/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod options {
use structopt::{clap::AppSettings, StructOpt};

#[derive(Debug, StructOpt)]
#[structopt(about = "The git, simply swift")]
#[structopt(name = "gio-plumbing", about = "The pretty git underworld")]
#[structopt(settings = &[AppSettings::SubcommandRequired,
AppSettings::ColoredHelp])]
pub struct Args {
Expand Down
2 changes: 1 addition & 1 deletion src/porcelain/lean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod options {
use argh::FromArgs;

#[derive(FromArgs)]
/// A simple calculation tool
/// The lean git
pub struct Args {
#[argh(subcommand)]
pub subcommand: SubCommands,
Expand Down
2 changes: 1 addition & 1 deletion src/porcelain/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod options {
use structopt::{clap::AppSettings, StructOpt};

#[derive(Debug, StructOpt)]
#[structopt(about = "The git, simply swift")]
#[structopt(about = "The pretty git")]
#[structopt(settings = &[AppSettings::SubcommandRequired,
AppSettings::ColoredHelp])]
pub struct Args {
Expand Down

0 comments on commit 1f9bc03

Please sign in to comment.