Skip to content

Commit

Permalink
style(args)!: rename --commit-path argument to --include-path
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Dec 1, 2021
1 parent 9d213f5 commit 7b000ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ git-cliff [FLAGS] [OPTIONS] [RANGE]
-c, --config <PATH> Sets the configuration file [env: CONFIG=] [default: cliff.toml]
-w, --workdir <PATH> Sets the working directory [env: WORKDIR=]
-r, --repository <PATH> Sets the git repository [env: REPOSITORY=]
--commit-path <PATTERN>... Sets the path to include related commits [env: COMMIT_PATH=]
--include-path <PATTERN>... Sets the path to include related commits [env: INCLUDE_PATH=]
--exclude-path <PATTERN>... Sets the path to exclude related commits [env: EXCLUDE_PATH=]
-p, --prepend <PATH> Prepends entries to the given changelog file [env: PREPEND=
-o, --output <PATH> Writes output to the given file [env: OUTPUT=]
Expand Down Expand Up @@ -208,7 +208,7 @@ git cliff HEAD~2..
Generate a changelog scoped to a specific directory (useful for monorepos):

```sh
git cliff --commit-path "**/*.toml" --commit-path "*.md"
git cliff --include-path "**/*.toml" --include-path "*.md"
git cliff --exclude-path ".github/*"
```

Expand Down
2 changes: 1 addition & 1 deletion git-cliff/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct Opt {
pub repository: Option<PathBuf>,
/// Sets the path to include related commits.
#[structopt(long, env, value_name = "PATTERN")]
pub commit_path: Option<Vec<Pattern>>,
pub include_path: Option<Vec<Pattern>>,
/// Sets the path to exclude related commits.
#[structopt(long, env, value_name = "PATTERN")]
pub exclude_path: Option<Vec<Pattern>>,
Expand Down
2 changes: 1 addition & 1 deletion git-cliff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn run(mut args: Opt) -> Result<()> {
}
}
let commits =
repository.commits(commit_range, args.commit_path, args.exclude_path)?;
repository.commits(commit_range, args.include_path, args.exclude_path)?;

// Update tags.
if let Some(tag) = args.tag {
Expand Down

0 comments on commit 7b000ad

Please sign in to comment.