Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Whenever an automated agent lands code in this repository, it must also:

- Bump the crate version in `Cargo.toml` before shipping.
- Run `cargo build` so `Cargo.lock` is updated, and commit any lockfile changes.
- Choose the bump size using semantic versioning rules:
- Increment the **major** version (`x.0.0`) for breaking changes.
- Increment the **minor** version when adding backward-compatible functionality.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "loki-cli"
version = "1.9.0"
version = "2.0.0"
authors = ["Kyle W. Rader"]
description = "Loki: 🚀 A Git productivity tool"
homepage = "https://github.com/kyle-rader/loki-cli"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Analyze commits reachable from HEAD to see who has been landing work in a reposi

- `--name` filters by author display name (repeatable, case-insensitive).
- `--email` filters by author email (repeatable, case-insensitive).
- `--first-parent` limits the analysis to first-parent commits.
- `--all` includes all commits (default is first-parent only).

#### Example
```
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ struct RepoStatsOptions {
#[clap(long, default_value_t = 20)]
top: usize,

/// Only include first-parent commits.
/// Include all commits (disables first-parent-only filtering).
#[clap(long, default_value = "false")]
first_parent: bool,
all: bool,

/// Only include commits authored by these names (repeatable, case-insensitive fuzzy match).
#[clap(long = "name", value_name = "NAME")]
Expand Down Expand Up @@ -236,7 +236,7 @@ fn repo_stats(options: &RepoStatsOptions) -> Result<(), String> {
options.emails.iter().map(|s| s.to_lowercase()).collect();

let mut git_args: Vec<String> = vec!["log".to_string()];
if options.first_parent {
if !options.all {
git_args.push("--first-parent".to_string());
}
git_args.push("--pretty=format:%ct%x09%an%x09%ae".to_string());
Expand Down Expand Up @@ -343,14 +343,14 @@ fn repo_stats(options: &RepoStatsOptions) -> Result<(), String> {
progress.finish();

if totals.is_empty() {
if options.first_parent {
if options.all {
println!(
"No first-parent commits found between {} and {}.",
"No commits found between {} and {}.",
range.start_label, range.end_label
);
} else {
println!(
"No commits found between {} and {}.",
"No first-parent commits found between {} and {}.",
range.start_label, range.end_label
);
}
Expand Down
Loading